Jump to content

mailto form


Guest Mongolish
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...