I installed recently the AppServ in my Windows. It is a software that install the last versions of Apache, PHP and MySQL and make them ready to use. But I noticed that a Javascript using jQuery is throwing this error:
[Exception… “‘Permission denied while calling XMLHttpRequest.open’ when calling method: [nsIDOMEventListener::handleEvent]” nsresult: “0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)” location: “<unknown>” data: no]
It is working fine at my production server, but not locally. Can’t jQuery AJAX run locally? The code is:
$('#email').blur(function() {
$('#login_msg').hide();
var user_email=$('#email').val();
if(user_email) {
if(validate(user_email,'email*')) {
$.post(
'http://www.domain.tld/login/ajax/',
{ email: $('#email').val() },
function(data,textStatus) {
if(data) {
$('#login_msg').html(data).fadeIn('slow');
}
}
);
} else {
$('#login_msg').html('Invalid Email address: '+$('#email').val()).fadeIn('slow');
}
}
});I remember that in my own AJAX script, the XMLHttpRequest return 0 (zero) instead of 4 for success, when it runs in a local server. I don’t know why, but maybe this is the problem. Any idea?