i have problems in sending the id of a html selected option to a struts action
This is a little confusing. Are you using an AJAX request to send request parameters, if yes, then show us the code for making the ajax request. Also as per what you said, the value is correct in JS but is null in the action, is it correct??
How are you submitting the form? Maybe there is a submit button in another form, which gets submitted instead of this!
OCJP 6 (93%)
Joined: Aug 11, 2008
this being a struts app, i have declared a bean in struts.xml that connects the action to the view. so from the action page i send data to the view page and when the user selects something i want to sent back a value on request.
this should have been as easy as that but something i am missing.
i first used a function(already tested in other examples) to get the value from request :
and so to get the value from the view i used:
This worked with a spring project.
and now here it does not.
Joined: Oct 08, 2009
You have to submit the form for the selected value to be available on the server side...