Forum Moderators: open

Message Too Old, No Replies

Export Page to File then Email

Java Program or Somthing Simple.

         

cluxmore

5:58 am on May 5, 2004 (gmt 0)

10+ Year Member



I would like to know if i can add a line at the bottom of me Java Program to Export the page to a file and open Email.

So far my Java Program works, Check list then Prints.

need to Add Email Page.

// Starts -->

<script language="JavaScript" type="Text/JavaScript">

function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"¦¦tempobj.type=="textarea")&&
tempobj.value=='')¦¦(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}
if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
alert("Please make sure the "+shortFieldName+" field was properly completed.");
return false;
}
else
if (window.print)
window.print()

}
// End -->

DrDoc

3:34 pm on May 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to Webmaster World!

Yes, it can be done in Java, but not JavaScript, which is what you are using :)
You need to use some form of server side functionality, preferably PHP/Perl/ASP... or even Java.

cluxmore

2:19 am on May 6, 2004 (gmt 0)

10+ Year Member



I see. I notice alot of programs out thier that can Email but i need one that can work with Windows.

The Java program is nie and simple that check my list to make sure everything is entered.

I tried Html format but wont work for me.

I will keep trying. I'm also reading alot of book to find the answer but still they point to a file program that will do the work for you.

Thanks for your help.
Chris

Rambo Tribble

3:12 am on May 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Just to be clear, you can open the default e-mail client on the user's system with JavaScript. You can even enter form field values from the HTML page as text in the e-mail body.

cluxmore

3:23 am on May 6, 2004 (gmt 0)

10+ Year Member



THanks, I will have to look that up.

I was trying to out put the webpage into a file and attach it to outlook and then let the user enter what ever he wants.

Thanks for the info

Chris Luxmore

DrDoc

5:26 am on May 6, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



out put the webpage into a file and attach it to outlook

That can't be done for security reasons. If that's what you want to do, provide a link to a downloadable file which the user can then attach to whatever mail client he/she is using.

cluxmore

5:35 am on May 6, 2004 (gmt 0)

10+ Year Member



The people that will be using this form are smart but when it comes to Computers they in a hole new world.

Having the file save to desktop that would confuse them.

trying to make it easy

So far im at this line now.

window.location = "mailto:cluxmore@rogers.com";

This will open outlook but will not attach the wegpage. Still working on it.

THanks. You guys are helping me out alot just from reading the posting.

Chris Luxmore