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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do you submit form data to a person readable email? 1

Status
Not open for further replies.

Naz

Programmer
Jun 13, 2000
8
GB
I am collecting form data and I want to post that data in a form readable by a person. The html SUBMIT to a MAILTO: produces a .att file which is good for databases but bad to read. I want to use javascript to intercept the form (which I can do) then the data to be put into the body text field. I have to use javascript or freebie easy to use stuff as I barely know javascript without getting into perl and all that.<br><br>Thanks<br><br>Naz<br><br>
 
If you've intercepted the form data, couldn't you simply write it to the text box using something like:<br><br>textboxname.value=&quot;data1.value + &quot;/n&quot; + ...+ datax.value&quot;;<br><br>The /n is a line break<br><br>Alternatively, couldn't you use document.write(data) to write it to a new page.<br><br>Where you've defined data=&quot;data1.value + &quot;/n&quot; + ...+ datax.value&quot;;<br><br>Russ
 
I got part way there but that .value looks like what I was missing.<br><br>Thanks.<br><br>Being new to this forum is it usual to post up the final solution or would you just laugh at my amaturish coding?<br><br>Naz
 
I may have missed the point but I gather you simply want to use a mailto to send form data via the surfers email sowftware without getting all that &ffh=334&fdfh=121 rubbish.<br><br>If so put the following in the form tag.<br>&lt;form action=&quot;mailto:address@place&quot; method=&quot;post&quot; enctype=&quot;text/plain&quot;&gt;<br><br>changing the encoding with the enctype attribute will make the resulting e-mail much more readable.<br><br>Sorry if this is not quite what you were after, however changing the encoding form the default URL encoded format may still be useful to you.
 
Excellent, that is exactly what I was after, thank you.<br><br><br>Naz <p>Guy<br><a href=mailto:guy@noisygraphics.co.uk>guy@noisygraphics.co.uk</a><br><a href=dont bother I'm still agonising over the text blurb.>Noisy Graphics</a><br>Experienced multimedia and game content artist, lots of 3d experience, also known to draw pictures. Fast becoming site designer and through pain and lack of sleep a coder. Game design and GUI a bit of a speciality.
 
I know this is really old ....
The 'enctype' works well for me, but I also see the submit action as part of the output of the form.
I there anyway to prevent this event from being added to the results of the form?

Also, is there a way to format the output yet further?

TIA,
MaKS

Thx,
MaKS
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top