3 Replies Latest reply on Oct 20, 2008 9:53 PM by Newsgroup_User

    Drop Down List

    Level 1
      I have categories stored in my database and being access by my drop down list. My question is how will I view the sub categories stored in my database in the next page just by clicking the category in the drop down list without using a button? Thanks in advance!!!!
        • 1. Re: Drop Down List
          Level 7
          without a button, you will have to do it with javascript.
          the simplest thing is to add an onChange event to your select element
          which will relocate the user to the next page, passing selected value as
          url variable:

          <select name="myselect"

          the above will take the user to nextpage.cfm?cat=[value of selected
          option]. so on the nextpage.cfm query your db to get the subcategories
          that belong to #url.cat# category.

          there are other, more complicated ways to do it: you may want to google
          "two selects related", which will show you how to populate a second
          select element on the same page based on selection in the first select


          Azadi Saryev
          • 2. Re: Drop Down List
            Dan Bracuk Level 5
            Make sure you indentify yourself on the page with the form so that any keyboard users can hunt you down and shoot you for building such a user unfreindly app.
            • 3. Re: Drop Down List
              Level 7
              hehe. agreed. but sometimes client's requirements are requirements.
              but i would probably still place a button next to the select as well...

              Azadi Saryev