Click to See Complete Forum and Search --> : specifying form recipient


LuigiX
12-15-2003, 01:15 PM
Hi

I am using Frontpage webots and want to send a form via email to a recipient selected from a dropdown list on the form.

eg if "John Smith" is selected then the form will go to "JohnS@myco.com"

Is this possible using javascript?

Cheers

Luigi

Khalid Ali
12-15-2003, 08:16 PM
yes its very much possible,what you will need to do is create your listbox as that the value attribute of the option contains the email address and the text part contains the actual name..then when user submits,change the action attribute with appropriate email address value

LuigiX
12-16-2003, 01:22 AM
Hi

How does this look?

Now I need to connect the value selected in the "Authorising Manager" field to the recipient's email address.

Can you help?

Cheers

Luigi



<html>
<head>
<title>Salary</title>
</head>
<body>
<form method="POST" action="--WEBBOT-SELF--" name="myForm">
<!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE"
S-Email-Address="whoever_the_authorising_manager_is"
B-Email-Label-Fields="TRUE" S-Builtin-Fields -->
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="319">
<tr>
<td width="167">
<p align="right">Salary</td>
<td width="148"><input type="text" name="Salary" size="20"></td>
</tr>
<tr>
<td width="167">
<p align="right">Position</td>
<td width="148"><input type="text" name="Position" size="20"></td>
</tr>
<tr>
<td width="167">
<p align="right">Authorising Manager</td>
<td width="148"><select size="1" name="Authorising Manager">
<option selected value="JohnB@myco.com">John Bull</option>
<option value="DaveC@myco.com">Dave Corleone</option>
<option value="LuigiX@myco.com">Luigi Corleone</option>
</select></td>
</tr>
<tr>
<td width="167">
<p align="right">From</td>
<td width="148"><select size="1" name="From">
<option>Jill Black</option>
<option>Johnny Wilkinson</option>
<option>Joan Watson</option>
</select></td>
</tr>
</table>
</div>
<p>&nbsp;</p>
<p><input type="submit" value="Submit" name="B1"><input type="reset" value="Reset" name="B2"></p>
</form>
</body>
</html>