SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2002
    0 Post(s)
    0 Thread(s)

    Exclamation Dynamically Update Dropdown Values

    Question, since I don't know JS that well:

    I have a form to make where the dropdown boxes are dynamically updated based on the choice from the previous field. I'm using an Access database and PHP, but I've been told I need JS to do this properly. Here's a quick sketch of the form idea:

    There's a form field 'School' which is populated with distinct school names from the 'School' table in the database.

    Once the user selects a school, the form field 'Teacher' is populated with matching teachers based on the 'SchoolAutoNum' field in the 'Teacher' table, where 'SchoolAutoNum' is equal to the school name from the 'School' table.

    Once the user selects a teacher, the form field 'School Year' is populated with matching school years based on the 'TeacherAutoNum' field in the 'Teacher Student Assignment' table, where 'TeacherAutoNum' is equal to the teacher name from the 'Teacher' table.

    And this goes on and on for a few more fields...

    Here's another post that explains the idea I'm going for:

    So, how do I dynamically update the dropdowns based on the choice of the previous field? Any help would be appreciated.

  2. #2
    American't awestmoreland's Avatar
    Join Date
    Sep 2002
    Grand Rapids, MI
    0 Post(s)
    0 Thread(s)
    I started off writing some code from scratch but it was looking painfully tedious, so I did what any self-respecting coder would do...looked for somewhere to steal it from

    I found this: tripleMenu.htm

    Hope it helps,



Posting Permissions

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