hey, i created a menu bar containing three items in it. i just want the coding in vb in such a way that if i click the first one it should be directed to one form, second is directed to the other form and third in the same way................................................................................... i'm using asp.net-3.5

Recommended Answers

All 3 Replies

you can use javascript....

on click of a option
redirect it using

window.location="link"

if you need more help , please post back...i'll write an example...
hope it helps...

here's the code

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

function display(obj,id1,id2,id3)
{

txt=obj.options[obj.selectedIndex].text;
//alert(txt)

if(txt.match(id1))
{
window.location="a.html"
}

if(txt.match(id2))
{
window.location="b.html"
}

if(txt.match(id3))
{
 window.location="c.html"
}

}
</script>
</head>


<body>
<select id="type" onChange="display(this,'one','two','three');" >
<option value="">select</option>
<option value="one">one</option>
<option value="two">two</option>
<option value="three">three</option>
</select>

</body>
</html>

hope it helps you....:)

you can make it better by inducing a delay, incase the user decides to change his mind...
with somthing like

setTimeout("window.location='a.html'",1500);

in the IF
statement...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.