Jump to content

form jump menu help


spires

Recommended Posts

Hi guys.

 

I'm trying to get a drop down menu to refresh the page when one of the options is selected.

 

But I can't seem to get it to work.

Could someone please advise on what to do?

 

Dropdown online:

http://www.businessmobiles.com/view_test.php

 

<html>
<head>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
</script>


</head>
<body>
<select name="user" onChange="this.form.submit()">
<option value="1" selected="selected">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>  
</body>
</html>

Link to comment
Share on other sites

Maybe I'm a little off the beaten path, but this should work:

<html>
<head>
	<script language="JavaScript" type="text/JavaScript">
		<!--
			function Reload(value)
			{
				if(document.getElementById('user').value == "1")
				{
					window.location = "http://www.firemelt.net";
				}

				if(document.getElementById('user').value == "2")
				{
					window.location = "http://www.google.com";
				}

				if(document.getElementById('user').value == "3")
				{
					window.location = "http://www.cnn.com";
				}
			}
		//-->
	</script>
</head>

<body>
	<select id="user" onChange="Reload()">
		<option selected="selected">-- Select an Option --</option>
		<option>1</option>
		<option>2</option>
		<option>3</option>
	</select>
</body>
</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.