Does onselect in one combo dynamically change data in another combo?

Hi sir. I am new to jsp and ajax world. my problem If I select one combo option, it should dynamically change other combo parameters without pressing the submit button. for example, if I select a country, then it should show its states in another combo. I am using servlet and JSP and MS-ACCESS as backend. please reply as soon as possible.

THANK YOU....

0


a source to share


1 answer


You need:

  • A JSP part that returns a string that can be parsed into javascript to create a list of possible combobox items (value, name) to select in a SECOND combobox based on VALUE that can be selected in a FIRST combobox
  • The javascript part that receives the onChange event from the FIRST combobox and uses the then selected value to create an XMLHTTP request for your JSP (in 1)
  • A piece of javascript that you can pass an XMLHTTP request for the ReadyStateChange event to execute that reads / parses the syntax string (of 1) and fills the second COMBOBOX with those values


Good luck.

0


a source







All Articles