SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Jan 2012
    0 Post(s)
    0 Thread(s)

    Collapsing Database Displays

    Before I try to explain what I'm trying to do, let me show you an example -

    The page displays a list of taxons (in this case, phyla) in a parent-child relationship, with the parent being animals (Animalia). If you click on a tiny box with a + sign, it displays that particular phyla's children. If you choose Chordata, it displays a list of children that include class Mammalia (mammals), and so on.

    Anyway, I'd like to do something similar on my website, which focuses on animals and plants. I already have PHP/MySQL queries that display each taxon's children. I'd just like to know how to make them display with the little boxes that expand and collapse the children, menu or whatever they're called.


  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Melbourne, AU
    460 Post(s)
    8 Thread(s)
    You'd normally do effects like that with JavaScript—such as with an accordion script: However, that's not really the script you want in this case.

    I've moved this to the JavaScript forum, where someone will know of a script that does exactly what you want.


Posting Permissions

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