Welcome to WebmasterWorld Guest from 54.159.214.27

Forum Moderators: open

drop down menu redirect

   
9:48 pm on Nov 30, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I want a simple drop down menu, and when an option is selected I want it to perform an action, e.g. redirect to a specific url.
How is this done?
6:48 am on Dec 1, 2012 (gmt 0)



Yes through .htaccess you can redirect these urls and it's working fine here.
10:51 am on Dec 1, 2012 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Why redirect (i.e. return 301 status)?

Why not just a straight link to the new URL?
7:13 pm on Dec 1, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ok sure, I would rather not use a redirect, how do I do it without a redirect, or without using a submit button?
9:33 pm on Dec 8, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




<html>
<head>
<title>URL Select</title>
<script type="text/javascript">
function goToUrl() {
var newurl;
newurl = document.getElementById('urlselector').value;
document.location.href = newurl;
}
</script>
</head>
<body>
<form>
<select id="urlselector" onchange="goToUrl();">
<option value="">- select -</option>
<option value="http://www.bing.com">Bing</option>
<option value="http://www.google.com">Google</option>
<option value="http://www.yahoo.com">Yahoo!</option>
</select>
</form>
</body>
</html>
 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month