Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in onclick radio and dynamically populated table

 
Ranjeetitm Singh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all, I have a problem realated to javascript , ajax and jsp.
Please see this url http://xil.co.in/print_screen_2.JPG.

I am working on this form. There are some buttons (like submit , add ,edit at bottom of this page , but not visible in printscreen).

On click of a radio button on left side , form fields on right side and small table on right bottom is gettig populated. The table on right bottom , is actually the eligibility criteria associated with the record whose radio was clicked on left . On clicking radio of this record(right side) , I want to populate its values in the above text boxes present right in front of text "Eligibility".

During the whole click process (clicking the left and right radio button ) page should not get refreshed.
I am able to show records on left side by iterating over a resultset (in jsp) and able to populate field on right side also, but have no idea how to populate table on right bottom dynamically such that on click of its radio button , values gets populated on fields above.

Please tell me how to achieve this. Thanks in advance for any help.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you done any Ajax examples/tutorials of pulling data into a page?

Eric
 
Ranjeetitm Singh
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No ,I know javascript but, have very little knowledge of Ajax.
I have only read ajax tutorial given on w3schools.
Please guide me how to achieve this, even if the possible solution is by the use of Ajax.

I tried to add rows in table on right dynamically , but couldn't get success in calling onclick ,passing javascript variables as parameter.
I tried this.


 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are really considering this I would say use a JavaScript library such as jQuery to do the Ajax calls. You only need to do Ajax if you have to get the values from the server.

Start out small trying to get data from the server, than try to figure out if you are returning HTML from there or JSON. It all depends on your design. Without knowing specs, I can not help you out. Plus I am not going to do your job for you.

Try running through more tutorials and not just one basic one.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic