Forum Moderators: open
I have a DB with all the types(1) and categories(2);
The selected option queries the DB (MySQL - Server) with 2 tables: (1): 70 entries and (2): ~ 17.000 entries (the tables are InnoDB); if option "1" is selected then <select>2 will queries the DB and changes with the caractheristics of option selected(extract ~ 1200 entries from 17.000);
So you're looking for an AJAX solution to populate the 2nd dropdown list. I've not done it myself, but I image it would be something like this:
// 1. Load the page with all options for the first select box (types).
// 2. Create an onchange event handler for this select box. This handler will get the value from the select box and create an AJAX request to the server. The server will get the Categories for that value and return the list.
// 3. When your response comes back from the server, create an array of Option objects from the list and set the array to the options of your 2nd select box.
Wish I could provide more help.