| | |
Drop down list Selected Value - Current Page
Please support our JavaScript / DHTML / AJAX advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jan 2005
Posts: 10
Reputation:
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
![]() |
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
| Thread Tools | Search this Thread |
Tag cloud for JavaScript / DHTML / AJAX
ajax ajaxcode ajaxhelp animate api automatically beta boarder box bug calendar card checkbox child class column cookies createrange() css cursor dependent disablefirebug dom download dropdown editor element engine error events explorer ext file firehose flash form forms game google gwt html htmlform ie8 iframe image() images internet java javascript jawascriptruntimeerror jquery jsf jsfile jump math matrixcaptcha microsoft mimic mp3 mysql object offline onmouseoutdivproblem onreadystatechange parent passing pdf php player post problem progressbar rated rating regex runtime scroll search select session shopping size sql star stars stretch text textarea twitter validation w3c web website window windowofwords windowsxp wysiwyg xml xspf \n





