Click to See Complete Forum and Search --> : Help with Form Action and Mailto


scuda11
09-08-2006, 01:57 PM
Hello all, new to the forum. This might need to be in the Javascript forum, not sure.

I am using the code at the bottom. My question is there any way to add a line breask <br> or any other formatting to the BODY of the email that is created? For example, I would like the resultant e-mail to have the TO:, CC:, and SUBJ lines filled in (those are working fine). But in the body, is where I want to add some formatting, is this possible? I have "TEST" there now.

Thanks in advance!
Scott

<div id="emailNOTIF">
<form action="(EmptyReference!)" method="get" name="emailNOTIF">
<select name="emailcommand" size="1" onChange="goTheredocument.emailNOTIF.emailcommand)">
<option>Notification System</option>
<option value="mailto:SCOTT.A.BACKHOLM@uscg.mil?CC=scuda@comcast.net&subject=Incident Notification System&BODY=TEST">Incident Notification System</option>

</select>
</form>
</div>

the tree
09-08-2006, 03:19 PM
If you're being sensible then you'll be using a server-side process that will happilly format the e-mail you create however you like. Note the sticky at the top of this board.

scuda11
09-08-2006, 04:01 PM
All I have is a small .html file that is used locally. I don't think I need a server side form, what I have seems to be fine for now. I was just wondering if what I asked was possible.

Thanks.

crazycoder
09-08-2006, 07:50 PM
you'd still need to do it with a server-side script for any changes you want to make to the way it's emailed.

ray326
09-08-2006, 08:47 PM
I was just wondering if what I asked was possible.No. When you use the mailto: action then you get raw form data in the format you state for an enctype.

http://www.w3.org/TR/html401/interact/forms.html#edef-FORM

crazycoder
09-08-2006, 08:56 PM
but you can't control line breaks in the enctype. besides, mailto doesn't even work in new browsers

scuda11
09-08-2006, 09:03 PM
Thanks very much!

crazycoder
09-09-2006, 07:47 PM
no problem :)