tags:

views:

66

answers:

3

I want the form to be submitted when the user chooses one of the radio button options. I know how to do this with select fields:

<select name='something' onchange="this.form.submit()">

But how to do this with radio buttons?

A: 

Try hooking into the onclick event.

George Marian
+4  A: 

You can use onclick:

<input type="radio" name="something" onclick="this.form.submit()">

You can test for compatibility (of keyboard entry like left/right or tabbing then pressing space/enter and even keyboard only navigation plugins) using this example.

Metalshark
A: 
<input type="radio" name="something" value="somethingvalue" onclick="this.form.submit();" />
Kurucu