•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 426,256 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,078 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 2945 | Replies: 1
![]() |
•
•
Join Date: Jan 2005
Posts: 10
Reputation:
Rep Power: 4
Solved Threads: 1
I want to us a simple HTML drop down lists (<select name="menu"....) as a quick jump between a couple of different html pages. I was able to come up with the script to have the pages jump to the URLs. However, I was hoping to have the current page dynmically selected. For example, If I am on the page for Nike Running Shoes (nike-running-shoes.html) that value in the drop down would be selected.
Any suggestions...?
Any suggestions...?
here is the script:
html Syntax (Toggle Plain Text)
<select id="jump"> <option value="http://localhost/page2.html" onclick="javascript:window.location = this.value;">page2</option> <option value="http://localhost/page1.html" onclick="javascript:window.location = this.value;">page1</option> <option value="http://localhost/page3.html" onclick="javascript:window.location = this.value;">page3</option> </select> <script type="text/javascript"> var slect=document.getElementById('jump'); if(slect.value!==location.href){ slect.value = location.href; } </script>
toast
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- php drop down menu to search multiple sql tables (PHP)
- I NEED HELP PLEASE:Warning: mysql_num_rows(): (PHP)
- I NEED HELP PLEASE:Warning: mysql_num_rows(): (MySQL)
- Warning: mysql_num_rows(): (PHP)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: Javascript Compiler/Checker?
- Next Thread: Easy w Frames tough w CSS


Linear Mode