...that I post this question here.
This is probably such a newbie question, but how do you set up a form so if one option is selected out of 2 more, the form is sent to that person selected?
Goober was right.
Try something like this:
<html>
<head>
<title>Send Email</title>
<script language="JavaScript">
<!--
function sendForm() {
document.myForm.action = 'mailto:' + document.myForm.nameList[document.myForm.nameList.selectedIndex].value
myForm.submit();
}
// -->
</script>
</head>
<body>
<form name="myForm" method="post" onSubmit="return sendForm();">
<select name="nameList">
<option value="mo@mo.com">mo</option>
<option value="larry@larry.com">larry</option>
<option value="curly@curly.com">curly</option>
<input type="submit" name="submit" value="Send Email">
</form>
</body>
</html>
It uses a select menu, but could just as easily be adapted for radio buttons or whatever else.
Shame on me. I didn't close my <select> tag.
Thanks scrubz! Cute avatar.
No problem, emmester. And since you mentioned it, the avatar is actually me at 7 months of age, with a wig on (compliments of my older siblings).
Posting Permissions
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Rules
Bookmarks