Submit to different emails via submit

liunx

Guest
Hi,<br />
<br />
Does anyone know how I can get a form to email to different email addresses depending on what choice is made in a previous dropdown box<br />
<br />
I want the form to submit to whichever option the user selects - i.e. mail to the person chosen from the dropdown<br />
<br />
e.g. I have a form that contains a dropdown with 5 different people, depending on whom i opt for - onsubmit will send to one of 5 people...<br />
E.g. John - if the user select a option John and clicks submit the form knows to mail it to <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --><br />
If the user selects a option Jack and clicks submit the form knows to mail it to <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --><br />
If the user selects a option Jill and clicks submit the form knows to mail it to <!-- e --><a href="mailto:[email protected]">[email protected]</a><!-- e --><br />
<br />
I hope this makes sense, any help is very much appreciated<br />
Thanks!<!--content--><script><br />
function setAddr(fm) {<br />
action = "mailto:" + fm.s1.options[fm.s1.selectedIndex].value;<br />
fm.action = action;<br />
alert(fm.action);<br />
fm.submit();<br />
}<br />
</script><br />
<form action="mailto:" onsubmit="setAddr(this)"><br />
<select name="s1"><br />
<option value="[email protected]">One<br />
<option value="[email protected]">Two<br />
<option value="[email protected]">Three<br />
<option value="[email protected]">Four<br />
<option value="[email protected]">Five<br />
</select><br />
<input type="submit"><br />
</form><!--content-->Hi Gil,<br />
<br />
Thanks for this - this is what I am after... However I am having a few difficulties getting it to work in my form<br />
<br />
I have created the form via frontpage and frontpage creates the following at the beginning of the form - so my form will go to this address, I have tried removing htis default address but still no joy - is there anything I shoudl be putting in there?<br />
<br />
<!--webbot bot="SaveResults" startspan<br />
U-File="../_private/ReleaseTaperequests.html" S-Format="HTML/BR"<br />
S-Label-Fields="TRUE" B-Reverse-Chronology="FALSE" S-Email-Format="HTML/PRE"<br />
S-Email-Address="[email protected]" B-Email-Label-Fields="TRUE"<br />
B-Email-Subject-From-Field="FALSE" S-Email-Subject="Release Tape Request Form"<br />
S-Builtin-Fields U-Confirmation-Url="thanks.htm" --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot<br />
bot="SaveResults" endspan --><!--content-->I have no idea. I'm not familiar with that structure.<!--content-->
 
Back
Top