0

The following works fine on my local PC in IE11, FF28.0.

In IE9, Chrome 26.0.1410.64, FF19.02 it throws a 403. I have tried setting the called php file to CHMOD 777, but that did not help. All of the non-working browsers happen to run in a virtual environment (Citrix). Could that be the cause of this problem? Thanks!

if (window.XMLHttpRequest)
{
    // AJAX for IE7+, Chrome, Firefox, Safari, Opera
    xmlhttp=new XMLHttpRequest();
}
else
{
    // AJAX for IE6, IE5
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}    
xmlhttp.onreadystatechange=function()
{
    if (xmlhttp.readyState==4 && xmlhttp.status==200)
    {                      
        document.getElementById("loginresponse").innerHTML=xmlhttp.responseText;                                 
    }
}            
xmlhttp.open("GET","inc/ajax.login.inc.php?lang=en&"+$("#loginform").serialize(),true);          
xmlhttp.send();   
floko
  • 3
  • 3
  • Why are you not using `$.ajax`? – epascarello Apr 09 '14 at 14:10
  • For no specific reason. Above solution simply worked for me so far. If this would solve my problem, though, I would try $.ajax of course. – floko Apr 09 '14 at 14:50
  • Just tried a very simple test with $.ajax as suggested. Again this only works in my local browsers, not in the virtual desktop (error code 403). I can't figure out what's going wrong... – floko Apr 10 '14 at 08:26
  • I also tried in a local environment with IE8. All working fine. – floko Apr 10 '14 at 08:34
  • Solved via workaround. I placed all called scripts in the same directory as the calling script, now it works in all browsers. – floko Apr 10 '14 at 11:31

0 Answers0