I have a page in my asp.net mvc shopping cart that allows you to enter a coupon and display an order summary along with other page contents. I would like to have a Refresh button that will check the coupon code, report any errors, and also update the summary of orders on the page through jQuery ajax.
I know that I can do this by creating a form and a partial view and using the target property in the jQuery view. However, I thought I could do something like the following:
var options
{
success: function (responseHtml) // contains the entire form in the response
{
}
}
$('#my-form').ajaxSubmit(options);
The advantage here is that I would not need to completely refresh the page or create a partial view containing all the areas that need updating. Is there a way to do this using jQuery ajax?