Jump to content

mailto form


Guest Mongolish

Recommended Posts

Guest Mongolish

ok.this is my code

<html><body><h3>This form sends an e-mail to W3Schools.</h3><form action="MAILTO:(?)" method="post" enctype="text/plain">Contact:<br /><form action=""><select name="names"><option value="***@hotmail.com">Trevor</option><option value="***@hotmail.com">Nick</option><option value="***@hotmail.com">Sam</option></select></form><br/>Name:<br /><input type="text" name="name"value="your name" size="30" /><br />Your e-mail:<br /><input type="text" name="mail"value="your e-mail" size="30" /><br />Comment:<br /><input type="text" name="comment"value="your comment" size="40" /><br /><br /><input type="submit" value="Send" /><input type="reset" value="Reset" /></form></body></html>

as you can see i am trying to send a email to the three adresses though a drop down menu.the (?) is where im not sure what to put.any ideas?

Link to comment
Share on other sites

I would suggest using a server-side script to process your form, but if you still want to use the mailto: protocol you can do:

<select name="names" onchange="this.form.setAttribute('action', 'mailto:' + this.value)"><option value="***@hotmail.com">Trevor</option><option value="***@hotmail.com">Nick</option><option value="***@hotmail.com">Sam</option></select>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...