Firefox seems to mis-handle $.ajax POST to REST-style url web service
I am successfully using $.ajax to POST data to a REST-style web service but Firefox 3.6 and Chrome 7 return to my error:fn() while IE 8 returns to my success:fn(). The jQuery in all three browsers puts the user-supplied data in the database where it should be. Here is the $.ajax part of my code:
$.ajax({
type:"POST",
url:'http://localhost:52775/Service1.svc/myPost?x=' + $('input#boxInput').val(),
contentType: "text/plain",
success:function(xml) { alert('returned = ' + xml.text); },
error:function(theData) { alert('returned = ' + theData.text); }
} );
The web service has to have a POST. It gets its data from the querystring. That, ofcourse, is required for REST compliance. In addition to hitting the error:fn() even tho the data submit is successful; the alert that popsup reads, "returned = undefined" I guess that problem goes away if the POSTs from Firefox and Chrome return to my success:fn(). Ideas?
SideNote: Until I put the contentType: option in there the data was not getting in the db from Firefox. I guess there was this access control issue for Firefox.