37 users online (1 members and 36 guests)  


  Results 1 to 3 of 3

Related

  1. expanding/contracting like Wikipedia    Forum: Javascript Forum
    Replies: 14
  2. menus are over laying    Forum: Javascript Forum
    Replies: 2
  3. help with two drop down menus    Forum: Javascript Forum
    Replies: 3
  4. expanding table    Forum: HTML Forum
    Replies: 2
  5. Frames?Tables??Collapsible menus?    Forum: HTML Forum
    Replies: 2
  1. #1
    Ferinos's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    2

    Expanding/falldown/collapsible menus help please

    Hi all. I am pretty new to php and coding, but I am not doing anything major or from scratch. I am merely designing a website using a CMS (php) for my gaming clan. However, I have a small problem.
    I want to add a block that looks like this:

    Roster

    United Offensive
    (name1)
    (name2)
    (name3)
    (name4)

    Call of Duty 2
    (name1)
    (name2)
    (name3)
    (name4)

    I want the United Offensive and call of duty two to have a small icon beside them, or be text links, so that when I click them, the appropriate menu of names falls down. I want the menu to start minimised, so people can only see United Offensive and Call of duty 2. Then, when they press say call of duty 2, (name1)
    (name2)
    (name3)
    (name4) under the Call of Duty 2 hading will fall down. I don't mind whether it's a text link or an icon people need to press, but I would be grateful for help on this one. Manythanks.

  2. #2
    Tony89's Avatar
    New User

    Status
    Offline
    Join Date
    Dec 2007
    Posts
    2

    Re: Expanding/falldown/collapsible menus help please

    Unless you wanted the whole page to reload when a user clicks on these menus, I would suggest using javascript. It is easier to use javascript to manipulate data and elements on a page rather than using PHP.

    If you want to do it in php, then use the following...

    <a href = "currentpage.php?n=1">

    Then right underneath United Offensive use this...

    if ($_GET['n'] == 1) echo 'name1 name 2 etc.';

    You can do that for each menu, but like I said, if you don't want the page to reload between clicks, use javascript.

  3. #3
    Ferinos's Avatar
    New User

    Status
    Offline
    Join Date
    Nov 2007
    Posts
    2

    Re: Expanding/falldown/collapsible menus help please

    Cheers m8