954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Drop down list Selected Value - Current Page

I want to us a simple HTML drop down lists (

raywood5
Newbie Poster
10 posts since Jan 2005
Reputation Points: 10
Solved Threads: 1
 

here is the script:

<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>
hunkychop
Junior Poster in Training
55 posts since Mar 2007
Reputation Points: 13
Solved Threads: 4
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You