Use a dropdown list menu to switch to any page. All we have to do is design a form and a drop-down list box for. The following piece of code will do it for you…
<form method="post">
<select name="url" onchange="switchpage(this)">
<option value="http://www. weberdev.com">Weberdev</option>
<option value="">Redirect to...</option>
<option value="http://www.weberforums.com.com">WeberForums</option>
<option value="http://www.php-code-search.com">PHP Code Seach</option>
</select>
</form>
The onchange event triggers the switchpage(this) function which gets called with the index of the drop-down list box. Now we define switchpage(this).
<language="javascript" type="text/javascript">
function switchpage(select) {
var index;
for(index=0; index<select.options.length; index++)
if(select.options[index].selected)
{
if(select.options[index].value!="")
window.location.href=select.options[index].value;
break;
}
}
</script>
Here as we select any option from drop-down list box we get redirect to url value of that option.
Conditional Check - a script that allows a user to submit a form only if the user check a checkbox. Categories : HTML , Java Script , Form Processing , Beginner Guides PHP and javascript mouseover, mouseout, and mousedown events Categories : PHP , Java Script , Form Processing , Beginner Guides Changing the Style of form objects using the JavaScript OnClick method. Categories : Java Script , Form Processing , Beginner Guides , CSS Show hide table rows to make dynamic forms Categories : Beginner Guides , Java Script , Form Processing , HTTP Form Processing : with alert Highlight field name which is not filled by user Categories : Java Script , Form Processing , Data Validation , Beginner Guides , Web Design Run a function once per session. Categories : Beginner Guides , Java Script , Cookies Form Validation Using PHP to highlight non valid fields Categories : PHP , Form Processing , Data Validation , Beginner Guides Show and Hide Tables, Table Rows, Form Elements Etc. Categories : Java Script , Beginner Guides showing Help (assistance) to the user while filling html forms. Categories : HTML , Java Script , Form Processing Hilight Form Element onFocus Categories : Java Script , Form Processing , CSS Form validations using javascript and including all validations in one message Categories : HTML and PHP , Java Script , Form Processing Ajax - Perform a simple server side request and update the current HTML page. Categories : AJAX , Java Script , Beginner Guides Fancy Quick Access Navigation Link Categories : Java Script , Navigation , User Interface , DHTML , Beginner Guides Basic Authentication with sessions Categories : PHP , Beginner Guides , Authentication , Form Processing , Sessions Adding a Filter to a Text Element Categories : Java Script , Data Validation , Form Processing