reset AJAX, , . reset onsubmit() ( ), ( AJAX click(), submit()).
What you need to do is reset after issuing the AJAX request, that is, after calling $ .ajax () - but not in its callback function called when the request returns:
$("[name='GameStoryForm']").click(function() {
$.ajax({
type: "POST",
data: $("#GameStoryForm").serialize(),
url: "content/commentary/index.cs.asp?Process=EditLiveCommentaryStory&CommentaryID=<%=Request.QueryString("CommentaryID")%>",
success: function(output) {
$('#GameStorySys').html(output);
},
error: function(output) {
$('#GameStorySys').html(output);
}
});
$("#GameStoryForm").get(0).reset();
});
source
share