Ziggie
08-13-2005, 08:07 AM
I've never tried anything like this before, and I'm not even sure if it's possible, but here's what I'm trying to do. I am trying to setup a contact/feedback form that allows for one form but users will choose who they want to contact from a javascript drop down menu. I would like the selection they make to determine which PHP script that is called when the submit button hits.
Here's what I have so far, but I get a crash and burn every time I try (and yes, the PHP files are active, valid, and run if I don't use the javascript menu)
I have (embarassingly, looking at my code) tried to incorporate this, but I have made such a mess out of things.
<html><body>
<form name="jump">
<p align="center">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option selected>--Select One--</option>
<option value="<form action="php/editor.php" method="post">Editor in Chief</option>
<option value="<form action="php/webmaster.php" method="post">Webmaster</option>
<option value="<form action="php/artist.php" method="post">Web Artist</option>
</select></p>
</form>
<div align="center">
<table border="0" cellpadding="8" cellspacing="8" summary="feedback form">
<tr><td>Name:</td><td><input type="text" name="name" size="25" /></td></tr>
<tr><td>Email address:</td><td><input type="text" name="email" size="25" /></td></tr>
<tr>
<td colspan="2">
Message<br />
<textarea rows="15" cols="45" name="comments">
</textarea>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="Send Feedback" /><br />
</td>
</tr>
</table>
</div>
</form>
</script>
</body></html>
Here's what I have so far, but I get a crash and burn every time I try (and yes, the PHP files are active, valid, and run if I don't use the javascript menu)
I have (embarassingly, looking at my code) tried to incorporate this, but I have made such a mess out of things.
<html><body>
<form name="jump">
<p align="center">
<select name="menu" onChange="location=document.jump.menu.options[document.jump.menu.selectedIndex].value;" value="GO">
<option selected>--Select One--</option>
<option value="<form action="php/editor.php" method="post">Editor in Chief</option>
<option value="<form action="php/webmaster.php" method="post">Webmaster</option>
<option value="<form action="php/artist.php" method="post">Web Artist</option>
</select></p>
</form>
<div align="center">
<table border="0" cellpadding="8" cellspacing="8" summary="feedback form">
<tr><td>Name:</td><td><input type="text" name="name" size="25" /></td></tr>
<tr><td>Email address:</td><td><input type="text" name="email" size="25" /></td></tr>
<tr>
<td colspan="2">
Message<br />
<textarea rows="15" cols="45" name="comments">
</textarea>
</td>
</tr>
<tr>
<td align="center" colspan="2">
<input type="submit" value="Send Feedback" /><br />
</td>
</tr>
</table>
</div>
</form>
</script>
</body></html>