Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

e-mail -- &body ??

Status
Not open for further replies.

5656

Technical User
Jan 6, 2001
68
US
I'm attempting to input from a form to the body of an e-mail...is &body the correct syntax to write to the body of an e-mail...? If so I can't get it to work.
Please help...

thanks.
 
The & is not used to contatinate strings in Javascript if that is what you are asking.

var strA = "hello";
strA += " ";
strA += "world";

alert( strA); // should display "hello world"

Hope this helps
-pete
 
5656,

The sintax for email is &BODY= . There's a nifty little tool to help you put a mailto: link together:

If you can you post the entire page you are trying to put together, or point me to a URL, I can probably better help you with the Javascript email form you are trying to put together.
 
tleish,
The following is my script...
I cannot get the information that I input on the form to write to the body of the e-mail...??

-----------------
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--Begin

// Variables
var author='JF'
var vEmail='whoever@email.com'

// Input From Form
var strBCode = '';
var strEmailBody = '';


if (author == 'JF') {

helloo=prompt;
really=confirm;
}


function AAAinfo(){

strBCode = document.AAA.b_c.value;
strEmailBody = document.AAA.email_body.value;

if (really('This will send the following Buyer Code: '+strBCode+' to AAA - With the following info '+strEmailBody+'')==true){

document.location = 'mailto:' + vEmail + '?subject=' +strBCode+ '&amp;body=' + strEmailBody;
}
}

//End-->
</SCRIPT>



<FORM NAME=AAA>


Enter Subject:
<INPUT TYPE=text name=b_c>
<BR>
Enter Part #:
<INPUT TYPE=text name=email_body>
<BR>
<INPUT TYPE=button VALUE=&quot;send to e-mail&quot; onClick=&quot;AAAinfo()&quot;>
<INPUT TYPE=Reset VALUE=&quot;clear&quot;>

</FORM>
-------------------

Thanks again for any help !!
 
I just tried it in both NS4.7 and IE5.0 and your code worked perfect for me. What browser are you using and what email client are you using?
 
tleish,
I appreciate your continued help.
I'm using Netscape 4.5 with Microsoft exchange.
Why won't Netscape 4.5 allow the data input to the form write to the body of the e-mail ? any ideas of what it could be or what I could add to make Netscape 4.5 work would be appreciated -- my user base is all Nestscape 4.5 and Microsoft Exchange (I'm doing this for an intranet).

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top