<div class=".parentForm'>
@Ajax.BeginForm(... AjaxOptions { OnSuccess = "submitSuccess" })
{...}
</div>
function postDone(result,two, three) {
$('.parentForm').replaceWith(result);
}
I don't like this because if there are multiple forms from this partial they will all have the same class, and I would rather not come up with some funky scheme where I generate an ID on the server side and have to pass it around to the JS callbacks.
With .ajax I can use the this
to get the form that submitted the request, then from there get the parent .formContainer. Is there any way to get a referrence to the form that submitted the form with OnSuccess?