Select List Chooses New Page

[Total: 0    Average: 0/5]

This shows how to have a select list selection choose a new page.

Body Code:

<script language="JavaScript">
<!--
function go(){
if (document.selecter.select1.options[document.selecter.select1.selectedIndex].value != "none") {
location = document.selecter.select1.options[document.selecter.select1.selectedIndex].value
 }
}
//-->
</script>


<script language="JavaScript">
<!--
document.write('<form name="selecter"><select name="select1" size="1">');
document.write('<option value="none">Select a page ...');
document.write('<option value="none">------------------ ');
document.write('<option value="http://www.js-examples.com/">First page');
document.write('<option value="http://www.js-examples.com/consult/">Second page');

document.write('</select>');
document.write('&nbsp;<INPUT TYPE="button" VALUE="Go there ..." onclick="go()">');
document.write('</form>');
//-->
</script>

Times Viewed: 0

Leave a Reply

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