2

Hi,

I created one Dropdown menu like --Jump To--- .
a)google
b)Daniweb
When i click on the Jump To menu it displys two or more options like google or daniweb like above. When i click on the google it must call to hyper link and displays google website and daniweb as well. I hope you all understand. But i being failed to do this task. Could you please help out me regarding of this!!!

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by toydiaz
4

Yeah. I got your point. It was nice thinking actually. keep it up. Try this below code:

<html>
<head>
<script language="javascript" type="text/javascript" >
<!-- hide

function jumpto(x){

if (document.form1.jumpmenu.value != "null") {
document.location.href = x
}
}

// end hide -->
</script>
</head>
<body>
<form name="form1">
<select name="jumpmenu" onChange="jumpto(document.form1.jumpmenu.options[document.form1.jumpmenu.options.selectedIndex].value)">
<option>Jump to...</option>
<option value=http://www.daniweb.com>daniweb</option>
<option value=http://google.com>Google</option>
</select>
</form>
</body>
</html>
Votes + Comments
Better one...
Awsome Code yar. Your my hero!!!
2

Wow!!! It's really nice code. What a thinking you are!!! It was working greatly to me. Thank you very much...:)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.