August 27, 2014 9:51 am
I wanted to perform what I thought would be a simple task..
Select a Radio button and make this perform its task without submitting the form with an extra click on a button.
After much searching and trial and error I found that this task can be done with a simple extension to the radio button:
onClick = "$(this).closest('form').submit();"
Here it is in context:
@Html.Label("Student")
@Html.RadioButtonFor(model => model.RequiredFilter, "Student", new { @class = "radioAlignLeft", onClick = "$(this).closest('form').submit();" })
Hope it helps, if I had found this blog post it would have helped me!
Posted by Raymond Reid
Categories: .NET, JQuery, Windows
Tags:
Mobile Site | Full Site
Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.