I have a html form which contains group of radio buttons.
When one of them is selected, the form attribute "action" should be executed as well as the method "get".
But the problem is, selecting the radio button doesn't recognized as an event !!
and if I changed the radio buttons to submit buttons the click on the submit button will be recognized as an event and the action will take place, do you have any idea why??
HTML forms do not submit unless someone presses a submit button.
You can use Javascript to get your radio buttons to submit the form:
<input type="radio" onclick="this.form.submit();" />
Be aware, however, that a radio button that submits the form is something a user generally does not expect. Use with caution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With