In article <TA****************@news.optus.net.au>,
rg***@iinet.net.auau
enlightened us with...
I am trying to get users to fill in a form on a web page, then click a
button to send an e-mail. I am using JavaScript to get the fields from
the form, then run a mailto command to put the information into an
email.
I can create a mailto link in the page using innerHTML, but it seems
silly to click a button, a link appears, then click on the link.
How do I execute the mailto command using JavaScript?
You don't.
You've overcomplicating things.
If you want the form fields to get mailed from a link click, just use mailto
as the action of the form (like you did in your other post). Then, instead of
a submit button, do
<a href="javascript
:document.formname.submit();">Clic k to submit</a>
The form fields will all get mailed. No other javascript required.
Note that this is only for intranet apps, which you said yours was. There's a
crapload wrong with it for internet use. :)
--
--
~kaeli~
Frisbeetarianism (n.), The belief that, when you die, your
soul goes up on the roof and gets stuck there.
http://www.ipwebdesign.net/wildAtHeart http://www.ipwebdesign.net/kaelisSpace