$.ajax({
type: "GET",
url: 'http://services.somewhere.com/MethodName',
data: { 'param1':'something', 'param2': 'somethingElse' },
cache: false,
dataType: 'jsonp',
contentType: "application/json; charset=utf-8",
success: function(view) {
alert('success');
},
error: function(xhr, ajaxOptions, thrownError) {
alert(xhr.status);
alert(xhr.responseText);
alert(xhr.statusText);
}
});
views:
42answers:
1
A:
This problem is known and discussed on the jQuery page for ajax
You might have better luck using get instead
that ajax page is long, if you know what the problem is, mind telling the rest of us?
mkoryak
2010-06-10 14:23:49
From the `jQuery.get()` docs you linked to: *This is a shorthand Ajax function, which is equivalent to:* `$.ajax({ url: url, data: data, success: success, dataType: dataType });`
patrick dw
2010-06-10 14:25:43
Sorry, I guess that was a bit short.The request can be treated differently by browsers, for example, it might think you're calling XML if the page's mime type isn't set up by the server correctly.Also, there can be problems with asynchronous requests in FF that don't appear in other browsers.
2010-06-10 17:24:37