SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Dynamic resorting of multiline select box

    This post probably isn't quite what the thread title would imply. Here's the situation: I have a multiline select box populated from a MySQL query. The value for each option is set to the entry's id number; the option text is the entry's name. Each entry has other pertinent options that aren't present in the option itself (yet), such as location, type, author, etc.

    What I want to do is this: have input buttons that will automatically prune the list down depending on one of those other "pertinent options". For example, I click on the button that says "View Articles" - the script would automatically remove all items that weren't articles as defined by that option. Then if I clicked on the button that says "View Location One", it would only display items from Location One, also as defined by the option from the query. If it sounds a bit complicated, I can try and explain it better.

    I'm a near-total newbie to JavaScript - I'd like to learn, but so far as I can tell, there are no existing scripts like the one I'd like (that are public access). Any assistance would be a huge help, whether it be code, a link, or even a suggestion.

    Thanks in advance...
    signature

  2. #2
    SitePoint Guru Vincent Puglia's Avatar
    Join Date
    Feb 2000
    Location
    where the World once stood
    Posts
    700
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Armage,

    I'm not certain what you need exactly, mostly because I'm not certain how your data is going to be set up/defined/etc. However, there are a number of selection list script/tutorials at my site (GrassBlade) that might provide you with some insight. One of them in particular involves creating a second selection list based upon a selection from the first -- a sort of drop down/pruning effect.

    Vinny
    Where the World Once Stood
    the blades of grass
    cut me still


Bookmarks

Posting Permissions

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