Open a new webpage from a combo box onclick event for the option selected

iw4r3z

New Member
I have page with several combo-boxes. The combo boxes options are populated with this PHP code. ($id and $label are collected from an ini file.)\[code\]<?echo'<select id="wbox" name="MPR">';foreach($config[MPR] as $id=>$label){ switch ($id) { case ($id==select): echo'<option value="http://stackoverflow.com/questions/13709716/0" selected="selected"></option>'; break; case ($id>0 && $id<=10): echo'<optgroup label="'.$label.'">'; break; case ($id>10 && $id<=20): echo'</optgroup>'; break; default: echo'<option value="'.$id.'">'.$label.'</option>'; }}echo'</select>';?>\[/code\]At the end a submit button is clicked, and the values are handed off to another php script that redirects the user to a specific web page.I would like to be able to direct the user to the selected page in an onclick event with the combo box. (Each option would be a new page, corresponding to the value assigned in the option.)
 
Back
Top