I think it would be easier to have a hidden input that you can change the value of. Then, when the form is proccess, it can redirect them. Or, you could include all of the possibilities in one php page, then process the form.
PHP Code:
if(isset($_POST['hidden_input'])){
$hidden = $_POST['hidden_input'];
switch($hidden){
case 'b01':
//do something
break;
case 'b02':
//do something
break;
}
}
The JS would be something like:
Code:
function changehidden(thevalue){
document.form.hidden_input.value = thevalue;
}
<select name="dropbox" onchange="changehidden(form.dropbox.options[selectedIndex].value)">
<option value="b01">b01</option>
<option value="b02">b02</option>
</select>
(I think, but it's been a while since I've done something like that. If it doesn't work, let me know.)
Edit: wrong js code, fixed I think
Bookmarks