Page 1 of 1

Automatic Redirection from Drop down box

Posted: Fri Feb 14, 2003 5:27 am
by Mh_0
When an item is seleted in a drop down box, I need the page to call itself, and using my current code it doesn't, what have I done wrong?

<form NAME="resnav" ACTION="bevel2.php" METHOD="post" style="margin-bottom:0;">
<td>
<select name="select" onChange="<? PHP_SELF; ?>">
<option value="" SELECTED>UKORS</option>
<option value="">---------------------------</option>
<option value="ab">About</option>
<option value="nm>">NMEP</option>
<option value="http://www.soc.soton.ac.uk/OED/CruisePlan>">Cruise
Planning</option>
<option value="fa>">Facilities</option>
</select>
</td>
</form>

Obviously this form is in a table

Thanks in advance

Ps you can see the site at http://www.soc.soton.ac.uk/OED/NewWeb

Posted: Fri Feb 14, 2003 6:15 am
by pootergeist
onchange="document.location.replace('<?=$_SERVER['REQUEST_URI'];?>');"

Posted: Fri Feb 14, 2003 6:19 am
by pootergeist
note: that obviously wouldn't effect a POST of any of the form variables as it only refreshes the page.
If you were hoping to access the value of the selected item on the newly refreshed page, you would need to effect a form submit rather than page refresh

onchange="document.forms['resnav'].action = <?=$_SERVER['REQUEST_URI'];?>; document.forms['resnav'].submit();"