Js + ?

rick8028

New Member
Messages
5
Reaction score
0
Points
0
I know I am asking something pretty advanced here, but I got this menu working, but it doesn't collapse on start, I put in <body onload="toggle()"> But that doesn't work, somebody said to try that. I want the links hidden and the main, "Heading' visible, but when a person clicks a link under the main heading, I want it to display in a reading pane in the bottom, kind of like what Yahoo! uses, I find that an interesting idea, can anybody tell me what to do use? I do not think PHP will work, but who knows..
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
252
Points
63
PHP will not work, because it's server side, you need client side.

You can use Javascript to show and hide elements using the onclick event. So, currently, you have a shown menu, but you want it hidden first. You'd have to change the visible attribute of the menu items to "hidden" and then handle the onclick event of the heading to a function that will change the visibility back to shown.

dynamic drive has some truly awesome scripts pre made. check out some of these:

http://www.dynamicdrive.com/dynamicindex1/indexc.html
 
Top