Dependent Drop Down Menus 3 deep

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DonnaNJ
    New Member
    • Mar 2008
    • 1

    Dependent Drop Down Menus 3 deep

    Ugh .. You woudn't think this would be a challange - but I've been through searching everywhere and tried three different things and nothing works.

    I need a dependant drop down menu ... (PHP code)

    MAKE (Chevy, Toyota etc)

    MODEL (list of models depending on selected above)

    YEAR - list of years - depending on above two selections

    Now client doesn't want to "submit" after each selection so it has to be something that updates automatically. So probably js or AJAX.

    Problem is - I can get one level down (Make/model) but not the third. Also in the one method where I really do get the third to list ... there is no way to capture what was saved in Make/Model to pass to the next page.

    I don't want to just spit back what was selected - I need to take the three variables and pull information from a shopping cart catalog and display all that.

    Has anyone successfully done this ? Obviously someone has .. but I can't figure out all the pieces. It's not as easy as I though !

    Any info - or point me to something new.

    Thanks

    Donna
  • dlite922
    Recognized Expert Top Contributor
    • Dec 2007
    • 1586

    #2
    Originally posted by DonnaNJ
    Ugh .. You woudn't think this would be a challange - but I've been through searching everywhere and tried three different things and nothing works.

    I need a dependant drop down menu ... (PHP code)

    MAKE (Chevy, Toyota etc)

    MODEL (list of models depending on selected above)

    YEAR - list of years - depending on above two selections

    Now client doesn't want to "submit" after each selection so it has to be something that updates automatically. So probably js or AJAX.

    Problem is - I can get one level down (Make/model) but not the third. Also in the one method where I really do get the third to list ... there is no way to capture what was saved in Make/Model to pass to the next page.

    I don't want to just spit back what was selected - I need to take the three variables and pull information from a shopping cart catalog and display all that.

    Has anyone successfully done this ? Obviously someone has .. but I can't figure out all the pieces. It's not as easy as I though !

    Any info - or point me to something new.

    Thanks

    Donna
    I'm actually about to do something like this myself. But from what i've seen in most sites, they usually select the year first, or second, not last. Reason is, some models don't exists some years.

    Besides that fact, what i would do is three all peice of information with AJAX.

    On the Server side grab each one, if NOT blank, add it in the WHERE clause.

    Then return the results in XML format something probably like this:

    <makes>
    <make>Chevy</make>
    <make>Honday</make>
    etc
    </makes>
    <models>
    <model>HX</model>

    </models>
    <years>
    <year>2000</year>
    <year>1999</year>
    </years>


    Of course that's what it will look like after the second drop down. The first time the year would be empty until you select a model. Initially you want to have all the Makes listed to start with.

    It is easy to do. maybe you're looking too much into it. I'll never know until i'll complete it myself.

    Comment

    • hsriat
      Recognized Expert Top Contributor
      • Jan 2008
      • 1653

      #3
      Challenge!!!!!!!!?????? ...... :D

      Clever way to provoke guys out here to write code for you.

      But I guess along what dlite922 has advised you, you can check this link out.

      Comment

      • dlite922
        Recognized Expert Top Contributor
        • Dec 2007
        • 1586

        #4
        Originally posted by hsriat
        Challenge!!!!!!!!?????? ...... :D

        Clever way to provoke guys out here to write code for you.

        But I guess along what dlite922 has advised you, you can check this link out.
        honestly, its not that bad, i've seen way worse. The title implies, but the body says , point me in the right direction.

        It is kinda too much to ask to write the whole AJAX app for him. If he's tacking AJAX and application this big, i think he knows code well enough that if we tell him what to do, he can figure itout.

        W3Schools is a great website.

        I totally agree he's lacking in the AJAX department.

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          When you are looking for good tutorials, here are 2:
          1. Universal Related Popup Menus
          for a more general tutorial about related popups. and

          2. Universally Related Popup Menus AJAX Edition
          for a specific Ajax implementation of drop downs working towards an implementation of your request (i.e. car manufactorer -> model -> model level).

          Have fun.

          Ronald

          Comment

          Working...