Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Displaying a table when a link is clicked

    Hi,

    I am looking for suggestions/guidance on some work I am about to take on.

    I am creating a website for a restaurant, and they would like their menu displayed on site. The site will have a menu page, and i would like to split the menu into categories that would be listed down the left side of the screen. When a category is selected, a table will appear on the screen next to the category list displaying only the dishes in that category.

    Furthermore, it would be good if the table for each category can be stored in separate files e.g one file for starters, one for mains etc, making it easier to amend each category separately.

    I am not looking for anyone to write the code, as this is a good opportunity to learn more PHP (I have a basic knowledge so far). Im more interested in finding the basic structure i could use to make this work, what kind of PHP aspects I will need to use etc.

    If you can offer and advice it would be greatly appreciated!

    Thanks!

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,445
    Thanks
    17
    Thanked 273 Times in 273 Posts
    This might really be more of a job for javascript. Put the menu categories in their own divs, hide all the divs, make buttons or some other elements, they could be little divs to look like buttons, with an onclick function to unhide the corresponding div, make it so that only one div would show at a time, and it could be toggled closed. All neatly done and easy to do with javascript.

  • Users who have thanked DrDOS for this post:

    enhancedigital (08-24-2012)

  • #3
    New Coder
    Join Date
    Aug 2012
    Posts
    11
    Thanks
    3
    Thanked 0 Times in 0 Posts
    Thanks, i have ended up using some javascript code i found online.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •