+ Reply to Thread
Results 1 to 2 of 2

Thread: Js + ?

  1. #1
    rick8028 is offline x10Hosting Member rick8028 is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    5

    Js + ?

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

  2. #2
    garrettroyce's Avatar
    garrettroyce is offline Generally Helpful Member garrettroyce is a glorious beacon of lightgarrettroyce is a glorious beacon of light
    Join Date
    Apr 2008
    Location
    IL, USA
    Posts
    3,746

    Re: Js + ?

    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
    gjr.gr - coming soon: secrets of OCD coding from a self taught tinkerer

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers