• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Problem in onclick radio and dynamically populated table

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
We can fix it! We just need some baling wire, some WD-40, a bit of duct tape and this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic