Hi!
I have a form, which displays different drop down boxes based on the radio button selected. On SUBMIT button, I validate whether a radio button is pressed or not.
The above requirement is wrking fine. Now on successful validation i.e. on click of "SUBMIT" button, I want to display the value selected from the drop down as an alert.
I am unable to do so cause I am not sure how will i pass the selected drop down value on click of submit button.
Say for example: I select "California" on selecting radio button "USA"...hw wud i pass the value nd display "California" as an alert?
Its a lilltle urgent! Would really appreciate any help!! Thanks in advance!
Since your issue is with JavaScript, not JSP, you need to debug this on the client.
Be sure that the JavaScript console for your browser is open so you can see any errors that are occurring. At what point does code go wrong? What part works and what part does not?
Thanks Bear Bibeault! amazing that you formatted the code for me..looks indeed understandable.
Can some help provide me with a solution to my query? I want to display the value selected by the dropdown onclick of "SUBMIT" button.
You will need to store the value of the select-box shown in a globally declared javascript variable.
And using that id retrieve the value of combo value selected using
thanks!but still i am unable to understand the solution..my drop down elelmnet IDs are diffferent in each case..as in it depends on the radio button selected..How do i go abt it?
yeah, but ... what would PIE do? Especially concerning this tiny ad:
a bit of art, as a gift, the permaculture playing cards