Can we make the radio button to act as like a submit button? i.e,. Is it possible to pass the control from one page of JSP or HTML to another page by the onClick or anyother events of radio button like the submit button?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
From inside any HTML DOM event handler of any HTML input element in a HTML form, the parent HTML form element is accessible via the HTML input element’s
formproperty. The HTML form element has in turn asubmit()function which triggers the submit.So, this should do:
The
thisrefers the current HTML input element.The following shorthands are also valid:
But they may interfere if you’ve for some reason manually created a JS variable
formor a JS functionsubmit()in the global scope.Note that this all is basic HTML/JS and have in essence nothing to do with JSP. JSP is merely a HTML (and CSS/JS) code producer.