I am new to Ajax and have been fiddling with it for the last couple of days. I am trying to get a dropdown filter to work. I have managed to sort out the filter for the frist dropdown using a Ajax script but cannot get the second drop down to work. I am not too sure to write the correct Ajax syntax. My question is on the second dropdown, how can I pass the id for the first onChange event and the second onChange event...
Here is my explanation on what I am trying to achieve,
When a user selects Student Name from the frist dropDown, then the onchange event runs the Ajax script and filters the second Dropdown and displays all the exams details by the student name selected above. The code works fine uptill this point.
Now, when I select the second dropdown, I want it to take the value of the frist dropdown and the second dropdown and then filter the third dropdown. I do not know the correct syntax in Ajax on how to pass the onChange event on the frist two dropdowns.
Here is my html dropdown code:
Here is the Ajax script I am using:
Here is the dropdownlist.jsp page that runs the Ajax and gets the values for the second dropdown..
My Question is how can I write the correct syntax for running the Ajax script on the onChage event of the second dropdown? [ March 28, 2008: Message edited by: Bear Bibeault ]
Joined: Oct 24, 2007
Ok no reply so far! I think my post is a bit confusing. Let me explain from a different approach. I am using Using the rico.js file , I have the following script:
This passes "ajaxStudentID" to the file dropdownlist.jsp at the onChange event of the dropdownlist and filters the dropdown list below were div id = "examDropDownList". How can do the same filtering above but this time passing two values so the original "ajaxStudentID" and the onChange "value" of the second downdown, in order to filter the third dropdown.
In your last post i ask you how you are implementing AJAX. See use a correct framework can help you in solving all the problems for AJAX. Just implement DWR framework for implementing ajax. Please tell me are you using struts in you application.