Hi All,
Great site BTW!
OK, I'm very new at this so forgive me ignorance, please!
I have a little JS that emails elements from a form; name, choice from a drop-down list, and "comments". It all works fine except that when it dumps the results into the body of the email, there are no line breaks.
I tried adding + "\r" and "\n" with no improvement. I'm guess the script is sending plain text at this point. Is there any way to embed an ascii code for carriage return in the + "" section of this code?
Thanks.
--MK
PS I'm in a MacOS environment and I'm testing this in MacMail.
Great site BTW!
OK, I'm very new at this so forgive me ignorance, please!
I have a little JS that emails elements from a form; name, choice from a drop-down list, and "comments". It all works fine except that when it dumps the results into the body of the email, there are no line breaks.
I tried adding + "\r" and "\n" with no improvement. I'm guess the script is sending plain text at this point. Is there any way to embed an ascii code for carriage return in the + "" section of this code?
Code:
function SendEmail() { var dept = 'department'; var toaddy = 'X@xxx.com'; var subject = 'Contact Us Reply'; var mailer = 'mailto:' + toaddy + '?subject=' + subject + '&body=' + 'Name%20is:%20' + document.jsform.visitorname.value + "" + 'Request%20is:%20' + document.jsform.department.value + "" + 'Comments%20are:%20\n' + document.jsform.message.value + "" ; parent.location = mailer; } // -->
--MK
PS I'm in a MacOS environment and I'm testing this in MacMail.
Comment