Reputation: 18013
I have an ajax function that works on Android, iPhone, Blackberry torch and webkit browsers. Im trying to test this on various version 5 and 6 blackberry simulators but the error handler always gets called.
eg response in message boxes is: Error, Complete.
The error returned from the function is: 'Error- Status: error jqXHR Status: 0 ResponseText:'
Whereas all other devices is: Success Complete.
Do I have to do something special for blackberry?
$(document).ready(function () {
//Login form Login link click
$("#login a.login").click(function () {
//Call the approve method on the code behind
$.ajax({
type: "POST",
url: "Login.aspx/LoginUser",
data: "{'Username':'admin', 'Password':'admin' }", //Pass the parameter names and values
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
error: function (jqXHR, textStatus, errorThrown) { alert("Error- Status: " + textStatus + " jqXHR Status: " + jqXHR.status + " jqXHR Response Text:" + jqXHR.responseText) },
success: function () { alert('success'); window.location.href = "Index.aspx"; },
complete: function () { alert('complete'); }
});
});
});
Upvotes: 2
Views: 1578
Reputation: 71
try adding your url in the whitelist
<access uri="http://google.com" subdomains="true" />
or
<access uri="*" subdomains="true" />
Upvotes: 0
Reputation: 18013
Never got to the bottom of this, only solution is to not use ajax for version 4 and 6 BB's
Upvotes: 3
Reputation: 10964
If this is a copy and paste from your code, try changing "ssuccess" to "success" and see if that corrects it.
Upvotes: 0