Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run sub from onclick event

Status
Not open for further replies.

DebbieDavis

Programmer
Jun 7, 2002
146
US
I am working on a simple navigation column (backend SQL2000) with only 10 items. There are a few sub items under three of the parent categories and I would like them to display only when the user clicks on a main (parent) category. Is there a way to run a sub with an onclick even of the hyperlink to achieve this? Or does anybody have a better suggestion of how to expand the chosen parent folder without expanding all of them? Many thanks in advance.
 
Using Layers can do the trick for you.

Make Laysers like layer1 ,layer2,...layer3 unders the main category links. On a mouse click or mouse over even of the javascript set their visibility properties to show the sub links and/hide accordingly .


Secondaly you can pass a querystring to the same URL with the ID of the Main Category and then run a query to fetch the Sub-Category for the parent category.This way you will always have atmost one Parent Category ID to expand the Subs for it.

[peace]
 
Sounds like a great idea. I'll try it and let you know how it works. Many thanks!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top