Click to See Complete Forum and Search --> : inserting carriage returns


geuis
04-01-2003, 06:01 PM
I am writing a webpage that will take certain information from the page the code resides in and then place that into a new email message. So far my code works great, but I'm not sure how to make it put carriage returns into the email after each bit of data. Anyone have an idea on how to do this? Thanks.

function email()
{
var subject = document.forms[0].reason.options[document.forms[0].reason.selectedIndex].value
var varTL = document.forms[0].TLname.options[document.forms[0].TLname.selectedIndex].value
var body = new Date()



if (subject != "" && varTL != "")
{
location.replace("MAILTO:anywho@yomomma.com?cc= " + varTL + "&subject= " + subject + "&body=" + body);

return true;
}
else
{
alert("You must choose both a Team Leader and proper reason for this email.")
}

geuis
04-01-2003, 06:19 PM
Its not that simple. Since Microsoft Outlook uses normal windows carriage returns, \n does not cause a carriage return when placed into a blank email.

Is there a way to put the ASCII carriage return symbol into the body of the document using the code I have above?