Form
Post form via ajax and pass result to Success js function
The
Html.Awe.Form
helper will make forms of a certain class defined by .FormClass(string)
to be posted via ajax,
form submission can also be prevented with a confirm dialog by setting .Confirm(bool)
.
A js function can be set to handle the result from the server using .Success(string)
.
Ajax post can be disabled by using .UseAjax(false)
;
The class formLoad is added to show a loading animation when the post takes a long time, the code that does this is in aweUtils.js (init method).
Form used to post form via ajax and replace the content of the form with the result
show code
Used to confirm a form post, and post the form without ajax
show code
Comments