creating menu bar .....

hello experts ,

i want to create menu bar like it is there at the welcome page of sun having options java, solar , etc...in a jsp page . what should i do to hav my jsp page the similar menu bar. should i go foe .js file or scriptlet in jsp page itself. Any kind of example code would be more helpful....

thanx

[329 byte] By [NiXa] at [2007-11-26 19:34:43]
# 1
Hi, we generally do this kind of menu using javascripts, u can find a lot of resource regarding differend kinds of menu in the following site, http://javascript.internet.com/navigation/
peak-balua at 2007-7-9 22:08:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
thanx peak-balu .....but what they hav shown is for a html file ..... i m working on jsp ..... still will i be able to use same scripting code in my jsp page or ll i hav to make some changes in the scripting code?
NiXa at 2007-7-9 22:08:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3

You can do that with a combination of Javascript, CSS and HTML or XHTML.

One can write Javascript, CSS and HTML inside a JSP along with dynamic code.

You can use HTML list items, and make them appear horizontally, take a look at: http://alistapart.com/articles/dropdowns/

Also if you want to recursively generate menus (dynamically), from data that is stored in an XML file here's a tutorial:

http://thoughtsgarden.com/p/recursive-menus/

But the Sun's menu is not created recursively nor is it created with HTML list item.

It is created with Span and Anchor tags, and underneath each Anchor is a Div tag - All these are HTML tags , and then there's some styling with CSS and finally Javascipt is used.

JSPs support all the above technologies.

Message was edited by:

appy77

appy77a at 2007-7-9 22:08:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
Yes u can use the same script for the JSP's too,i have used and its working fine....
peak-balua at 2007-7-9 22:08:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
Thanx Everyone problem is solved............:)
NiXa at 2007-7-9 22:08:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
THANX A LOT,Too good a solution.Helped me a lot too
mroutlandera at 2007-7-9 22:08:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...