| Author |
getting values to table using ajax and servlet
|
shyamkumar bopannachengalaiah
Ranch Hand
Joined: Dec 30, 2008
Posts: 100
|
|
|
i am developing a application where the page contains two drop downs and a table with five columns.By using ajax and servlet i had retrieved values in drop down 2 based on drop down 1. say drop down 1 as institution and drop down2 as course .when i click drop down1( institutions) i got auto matically the corresponding courses in dropdown2 using ajax and servlet. now when i click the course in dropdown2, i have to get values that to be in some columns of a table in client side (say the table contains following columns:subjects,details of subjects,amount of subject,expire date)which has to be pick from database. how can i do this? Is there any url similar to this scenario with code. is there any examples available. kindly help me.
|
 |
Dawn Charangat
Ranch Hand
Joined: Apr 26, 2007
Posts: 249
|
|
I take it that you want your application to automatically fill in the data based on the "course" which is selected from the second drop-down box.
One of the options to do this is to place your table in a <div> tag, and then issue the URL to your servlet based on the input you received from second drop-down. You can send the response after querying your database as either XML or JSON. This response can be parsed at client side, and re-create the table... and finally refresh the <div>. That should solve your problem. Hope this helps.
Dawn.
|
 |
shyamkumar bopannachengalaiah
Ranch Hand
Joined: Dec 30, 2008
Posts: 100
|
|
Dawn Charangat wrote:I take it that you want your application to automatically fill in the data based on the "course" which is selected from the second drop-down box.
One of the options to do this is to place your table in a <div> tag, and then issue the URL to your servlet based on the input you received from second drop-down. You can send the response after querying your database as either XML or JSON. This response can be parsed at client side, and re-create the table... and finally refresh the <div>. That should solve your problem. Hope this helps.
Dawn.
Thanks sir .is there any example available sir?
I have already designed a div for the total table now if i put div for the particular row where the values have to be populated the design is getting collapsing .can you tell me the solution for this?
|
 |
 |
|
|
subject: getting values to table using ajax and servlet
|
|
|