On change select option redirect to different page

<select name='url' onchange="javascript:window.location.href=this.options[this.selectedIndex].value;">

<option value="">Action</option>

<option value="name_edit.php?id=<?=$d['id']?>">View details</option>

   <option value="javascript:if(confirm('Are you sure wish to delete?')){window.location.href='<?=$_SERVER['PHP_SELF'] . "?del_id=" . $d['id'];?>';}">Delete</option>

<option value="userlist.php?userid=<?=$userid;?>">User list</u></option> 
   <option value="ps.php?id=<?=$id;?>" target="blank">Product List</option>

</select>

Leave a Reply

Your email address will not be published. Required fields are marked *