Scenario: Within the onblur event of a html input control I send an async http post to a resource i.e. t.aspx.
I do not care if it ever returns, however if the users clicks submit I want the form to submit.
What I am seeing from using our simulators is that when I slow down t.aspx to take 10 seconds (page_load Thread.Sleep(10000)) when I click submit it continues to wait for the remainder of the 10 seconds and then submits.
I need the form to submit straight away. Below is a snippet of the ajax code
var _requestData = "{ " + "\"subject\": { " + "\"param1\": \"" + $("#param1").val() + "\", " + "\"param2\": \"" + $("#param2").val() + "\" " + "}" + " }";
$.ajaxSetup({ url: "t.aspx", type: "POST", processData: false, contentType: "application/json", dataType: "json", success: sucessfulCallback, error: unsucessfulCallback });
$.ajax({ data: _requestData });
I have also tried var myAjax = $.ajax ..... and calling myAjax.abort() within the form submit. No luck there either.
Any help would be much appreciated...
Regards David