aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Problem in onclick radio and dynamically populated table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem in onclick radio and dynamically populated table" Watch "Problem in onclick radio and dynamically populated table" New topic
Author

Problem in onclick radio and dynamically populated table

Ranjeetitm Singh
Greenhorn

Joined: Oct 01, 2008
Posts: 17
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
Have you done any Ajax examples/tutorials of pulling data into a page?

Eric
Ranjeetitm Singh
Greenhorn

Joined: Oct 01, 2008
Posts: 17
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

Joined: Nov 08, 2001
Posts: 15376
    
    6
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
 
 
subject: Problem in onclick radio and dynamically populated table