Submitting a form with a radio button

Submitting a form from a radio button is not common but it is a nice UI which is even better when done with AJAX.

A typical form with two radio buttons would look something like this.

1
2

1
2

But with basic JavaScript you can make a simpler form like this.


1
2
1
2

If you are using Struts the above form’s JSP would be:


1 
2


Leave a Reply

Your email address will not be published. Required fields are marked *