g118481
asked on
How to populate one drop-down from another drop-down selection?
I have 1 drop-down (select box) that gets populated by a query from my db table.
This part is working fine.
I have a 2nd drop-down (select box) that I need to populate based upon the user's selection from the 1st drop-down
The first drop-down is for SYSTEM field from the query, and the 2nd drop-down should also come from a query based upon the SYSTEM'S associated SUBSYS field.
How can I do this?
Any help will be much appreciated.
This part is working fine.
I have a 2nd drop-down (select box) that I need to populate based upon the user's selection from the 1st drop-down
The first drop-down is for SYSTEM field from the query, and the 2nd drop-down should also come from a query based upon the SYSTEM'S associated SUBSYS field.
How can I do this?
Any help will be much appreciated.
ajax would solve ur problemm..
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Kravimir,
The link you provided as an example is in PHP.
I can only use Javascript and JAVA/JSP coding.
I want a script with two chained selects, the first one is for a main category, all the categories are extracted from a database.
The second select contains subcategories which are also selected from a database, based on the system from the first select.
Does anyone have an example in JAVA/JSP?
I really need to get this working ASAP.
The link you provided as an example is in PHP.
I can only use Javascript and JAVA/JSP coding.
I want a script with two chained selects, the first one is for a main category, all the categories are extracted from a database.
The second select contains subcategories which are also selected from a database, based on the system from the first select.
Does anyone have an example in JAVA/JSP?
I really need to get this working ASAP.
did you see here?
http://getahead.org/dwr/examples
http://getahead.org/dwr/examples
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
I am looking for a JAVA or JSP solution, only.
check logudotcom 's solution
ASKER
I have asked for an example that is JAVA or JSP.
I cannot install any new class files to support anything than basic JAVA or JSP.
If a solution is not possible using JAVA or JSP, then is there a solution, where I can have the user select the SYSTEM from the select box, then go back to the server for the SUBSYSTEMS for that SYSTEM, and return the user to the web page form and fill the SUBSYSTEM select box for the user to select?
I cannot install any new class files to support anything than basic JAVA or JSP.
If a solution is not possible using JAVA or JSP, then is there a solution, where I can have the user select the SYSTEM from the select box, then go back to the server for the SUBSYSTEMS for that SYSTEM, and return the user to the web page form and fill the SUBSYSTEM select box for the user to select?
It doesn't mean that you cannot to do it with purely with JSP ... it is very much easy to do with DWR such AJAX frameworks ... it is advanced also... if u do it with JSP means it is again the old convention will be applied ..
ASKER
Loqudotcom,
With your suggestion, I have to load/install class files, etc., correct?
Well, I cannot do this, as I am using WebSphere Application Server on the mainframe Z/OS. It would take weeks to get the admin to install any files necessary to run DWR, and I do not have the luxury of time here.
With your suggestion, I have to load/install class files, etc., correct?
Well, I cannot do this, as I am using WebSphere Application Server on the mainframe Z/OS. It would take weeks to get the admin to install any files necessary to run DWR, and I do not have the luxury of time here.