Fork me on GitHub

uncaught exception: Permission refusée d'appeler la méthode XMLHttpRequest.open  Bottom

  • Did some of you have this problem with zikula ?

    this happend when you try to access a different domain with Ajax stuffs.

    Some people says that the best solution is to use a proxy like this
    http://www.troywolf.com/articles/#PHP

    but i m not convinced ?
  • i think i found what i wanted
    http://www.xml.com/pub/a/2005/12/21/json-dynamic-script-tag.html?page=1


    this way you add an element to your website, which will allow you to do the request to the server


    for the moment i ve got some problem, with this (authid, not working, but the query are done to all the servers)

    Code

    var siteCounter;     
    var userLoginstatus=false;
    var generalResult;
     
    function multiLogin(){
     
         if(userLoginstatus == false) {
            siteCounter=0;
            $('#headers').css('cursor','wait');
            userLoginstatus = true;
            generalResult = true;
            userLogin("http://mysite1.com");
            userLogin("http://mysite2.fr");
            userLogin("http://mysite3.org");
            userLogin("http://mysite4.org");
            userLogin("http://mysite5.org");

        }
    }     
         
    function userLogin(host)
    {
    //TODO timeout
                var request= host +"/index.php?"
                            + "module=Utilisateurs&"
                            + "type=user&"
                            + "func=login&"
                            + "uname="+ $("#uname").val()+"&"
                            + "pass="+$("#pass").val()+"&"
                            + "rememberme="+$("#rememberme").val()+"&"
                            + "url=" +$("#url").val()+"&"
                            + "authid="+$("#authid").val() ;
                request  = request+"&callback=userLogin_response";         
               
                //window.open(request);
                aObj = new JSONscriptRequest(request);
                aObj.buildScriptTag();
                aObj.addScriptTag();
               
     
    }

    function userLogin_response(originalRequest)
    {
       
        generalResult = generalResult & originalRequest.result;
        siteCounter++;
        alert(siteCounter);
        if ( siteCounter == 5 ){
            aObj.removeScriptTag();
            userLoginstatus = false;
            // redirect
            if (generalResult==false){
                // login screen
                ///Utilisateurs/loginscreen/
                window.location.href = getH()+ "/index.php?module=Utilisateurs&func=loginscreen";
            }else{
                // user page /Profil
                window.location.href = getH()+ "/index.php?module=Profil";
            }
        }
    }




    edited by: mumuri, Aug 30, 2008 - 12:30 PM

This list is based on users active over the last 60 minutes.