0

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

2
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by aashishn86
0

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...

0

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....:)

0

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...

This topic has been dead for over six months. 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.