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:[email protected]?cc= " + varTL + "&subject= " + subject + "&body=" + body);
return true;
}
else
{
alert("You must choose both a Team Leader and proper reason for this email.")
}
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:[email protected]?cc= " + varTL + "&subject= " + subject + "&body=" + body);
return true;
}
else
{
alert("You must choose both a Team Leader and proper reason for this email.")
}