This is weird.
Only on mobile safari, and since last night this script….
function login(login)
{
scrollTo(0,0);
var persistent = 'false'
if ($('#persistent').is(':checked')){persistent = 'true';}
if ($('#loginMsg').is(":visible")) {$('#loginMsg').hide();}
var password = $('#password').val();
var email = $('#email').val();
$.ajax({
type: "POST",
url: "rpc.php",
data: { id: email, value: password, persistent: persistent, method: "loginM"},
dataType: "json",
timeout: 5000,
success: function(data){
if (data.login=='true')
{
$('#pleaseWait').jqmShow();
location.reload(true);
}
else
{
$("#loginMsg").show();
$("#loginMsg").html(data.status);
}
},
/* error: function() {
alert('This is taking too long. You could try again now, or wait and try again later.');*/
error:function (xhr, ajaxOptions, thrownError){
alert(xhr.status);
alert(xhr.statusText);
}
});
}
alert(XMLHttpRequest.responseText);– returns me the entire script for the pagealert(textStatus);– returns ‘ok’alert(errorThrown);– returns ‘200’
When I run the script it errors immediately, doesn’t wait 5 seconds. I have quarantined the script so it is by itself so other scripts don’t interfere with it. Cleared the cache on the ipod.
This seems quite a common problem. One solution seems to be rebooting the sever which isn’t an option.
The URL is relative. It should be absolute like : http://myserver.com/rpc.php