Welcome to WebmasterWorld Guest from 54.162.168.187

Forum Moderators: open

Message Too Old, No Replies

drop down menu redirect

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

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2002
posts: 1544
votes: 0


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)

New User

joined:Dec 1, 2012
posts:10
votes: 0


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

Senior Member

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

joined:July 3, 2002
posts:18903
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Apr 21, 2002
posts: 1544
votes: 0


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)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Feb 16, 2004
posts:1341
votes: 0



<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>
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members