+ Start a Discussion
ArmanArman 

ERROR : uncaught exception: Permission denied to call method XMLHttpRequest.open

Could someone please explain to me why I can't stop this message in Firefox: uncaught exception: Permission denied to call method XMLHttpRequest.open

I've tried the solution that everyone here suggests (sforceclient.apptype = sforce.application.type.firefox) and thats not helping either.

This is my code:

function scontrolmain(IsStatic)
{
   try
   {
       sforcecleint=GetSForceClient();
   }
   catch(ExceptObject)
   {
       sforcecleint=null;
   }
   if(sforcecleint != null)
   {
       if(window.XMLHttpRequest)
       {
           sforcecleint.appType=GetSForceFFApplicationType();
       }
       loginresult=sforcecleint.login("xxx@xxx.com","xxx",null);
       showmessage(loginresult.toString());
       showmessage(sforcecleint.query("Select Id, LastName, FirstName From Contact",null).toString(null));
   }
   else
   {
       window.setTimeout(scontrolmain,100,"javascript");
   }
}


Message Edited by Arman on 08-27-2006 06:54 PM

Message Edited by Arman on 08-27-2006 06:54 PM

ArmanArman
I just discovered that if I set "signed.applets.codebase_principal_support" option to true in the firefox config file then the browser asks me whether I want to allow this http post to go ahead. When i say "Allow" it works like a charm. However this isn't a solution because I can't ask the people to change this option in the FireFox config. I don't think it can be but is it possible to set this option at runtime? because that way I could write it in my code to get this happen transparently.

For every XMLHTTP post to the server there will be an exception. Why I get this error which is a cross domain problem when I run my scontrol on our salesforce account?


Message Edited by Arman on 08-27-2006 08:02 PM

ErikGEnErikGEn
Hi
 
Try to encapsule your identification like that

sforceClient.setLoginUrl("{!API_Partner_Server_URL_70}");

var loginResult = sforceClient.Login(Login, password);

sforceClient.setUrl("{!API_Partner_Server_URL_70}");

and cross your finger ;)