| Author |
Struts with javascript
|
piyush kumar
Greenhorn
Joined: Feb 01, 2007
Posts: 20
|
|
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
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
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.
|
Merrill
Consultant, Sima Solutions
|
 |
John Simpson
Greenhorn
Joined: Sep 10, 2007
Posts: 25
|
|
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.
|
 |
 |
|
|
subject: Struts with javascript
|
|
|