homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

drop down menu redirect

 9:48 pm on Nov 30, 2012 (gmt 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)

Yes through .htaccess you can redirect these urls and it's working fine here.


 10:51 am on Dec 1, 2012 (gmt 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)

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)

<title>URL Select</title>
<script type="text/javascript">
function goToUrl() {
var newurl;
newurl = document.getElementById('urlselector').value;
document.location.href = newurl;
<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>

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved