943,906 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 1923
  • ASP.NET RSS
Jun 3rd, 2009
0

need coding for menu bar

Expand Post »
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
Last edited by mshravs; Jun 3rd, 2009 at 2:13 am.
Similar Threads
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
mshravs is offline Offline
75 posts
since May 2009
Jun 3rd, 2009
0

Re: need coding for menu bar

you can use javascript....

on click of a option
redirect it using
ASP.NET Syntax (Toggle Plain Text)
  1. window.location="link"

if you need more help , please post back...i'll write an example...
hope it helps...
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jun 3rd, 2009
0

Re: need coding for menu bar

here's the code

ASP.NET Syntax (Toggle Plain Text)
  1.  
  2. <html>
  3. <head>
  4. <script type="text/javascript" language="javascript">
  5.  
  6. function display(obj,id1,id2,id3)
  7. {
  8.  
  9. txt=obj.options[obj.selectedIndex].text;
  10. //alert(txt)
  11.  
  12. if(txt.match(id1))
  13. {
  14. window.location="a.html"
  15. }
  16.  
  17. if(txt.match(id2))
  18. {
  19. window.location="b.html"
  20. }
  21.  
  22. if(txt.match(id3))
  23. {
  24. window.location="c.html"
  25. }
  26.  
  27. }
  28. </script>
  29. </head>
  30.  
  31.  
  32. <body>
  33. <select id="type" onChange="display(this,'one','two','three');" >
  34. <option value="">select</option>
  35. <option value="one">one</option>
  36. <option value="two">two</option>
  37. <option value="three">three</option>
  38. </select>
  39.  
  40. </body>
  41. </html>

hope it helps you....
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008
Jun 3rd, 2009
0

Re: need coding for menu bar

you can make it better by inducing a delay, incase the user decides to change his mind...
with somthing like
ASP.NET Syntax (Toggle Plain Text)
  1. setTimeout("window.location='a.html'",1500);
in the IF
statement...
Reputation Points: 10
Solved Threads: 9
Junior Poster
aashishn86 is offline Offline
184 posts
since Jun 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: Embed Videos on ASP.net page using Silverlight
Next Thread in ASP.NET Forum Timeline: Reading and comparing data from 2 tables





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC