One of Nine uses consistently does not fire, as in Firebug the break at "return false;" never catches a completed execution, on this one call. The best part, the exact same call (the jquery ajax) works fine in a stand alone web page.
I have read many excellent suggestions and have gleaned a great deal from the collective talent out there. This particular issue has me perplexed and I'm hoping that someone out there has come across this, and specifically, I'm hoping that it turns out to be something truly simple.
The following function works on 8 out of 9 defined calls. The data used is consistent with the successful calls. The parameters for "posturl" and "postdata" are constructed prior to any of the calls.
"posturl" contains a uri for an asp.net proxy and a uri destination.
"postdata" has been used as both a reference object such as { Command : 1, ...}, or if your prefer { Command : "1", ...}, and as a string as in "Command=1&..." - my preference is as a reference object (cleaner, simpler, ...). The "Command" element data is actually in the Web Services class as an int and it has been passed as both string and int successfully in other service calls. All other data elements are strings to the Services classes.
function PostTheCall(posturl, postdat) {
$.ajax({ url: posturl,
data: postdat,
type: 'POST',
contentType: 'application/x-www-form-urlencoded; charset=UTF-8',
cache: false,
dataType: 'json',
error: OnPostAccessError,
success: OnPostAccessSuccess,
complete: OnPostAccessComplete,
beforeSend: OnPostAccessBeforeSend
});
return false;
};
In addition, I have also used the following without any effect on the nine service calls - just something else I have already tried:
accept: 'application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png;q=0.5,OPTIONS,POST',
So have at it folks, wake me from this weird journey into the rabbit hole...
Thanks in advance, Chuck