• 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
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Struts with javascript

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
i have one jsp which is called viewserver.jsp and viewaction class, now what i am doing is ion my jsp there are some radio buttons and corresponding values of the radio button. now when i click on the radio button iot calls a javascript function serverid(this.form, this.value) in which i am passing the form and the corresponding value which is clicked . now i want that this value should be transffered to my Action class which uis viewaction for furthur processing. c an anybody tell me how to transfer the single value to the action class.
thanks in advance
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why not just submit the form? Then the action class can just read the value from the request.

If you want to communicate with the Action without submitting the form, you will have to use an AJAX call.
 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To further elaborate on Merrill's point,

Make sure that you have an id for the element, and also make sure that the ActionForm of your jsp has corresponding setters/getters for the parameter of that id.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic