{"id":34,"date":"2008-01-21T23:56:41","date_gmt":"2008-01-21T23:56:41","guid":{"rendered":"http:\/\/installingcats.com\/2008\/01\/21\/xmlhttprequest-permission-denied-fix-salesforcecom-ajax-toolkit\/"},"modified":"2008-01-21T23:56:41","modified_gmt":"2008-01-21T23:56:41","slug":"xmlhttprequest-permission-denied-fix-salesforcecom-ajax-toolkit","status":"publish","type":"post","link":"https:\/\/installingcats.com\/2008\/01\/21\/xmlhttprequest-permission-denied-fix-salesforcecom-ajax-toolkit\/","title":{"rendered":"XMLHttpRequest permission denied fix – Salesforce.com Ajax Toolkit"},"content":{"rendered":"
Update: This post has been superseded by How to Fix Ajax Error: permission denied to call method XMLHttpRequest.open<\/a>.<\/p>\n For anyone developing S-controls and applications for use in Salesforce.com, developing directly within their platform is a bit of a hurdle. Using their Ajax Tools Development Environment for quick changes is fine. But, developing a serious piece of code purely using that tool is far from a pleasant reality today. Hence its natural to develop on a local machine then upload to Salesforce.com when a piece of software is ready for testing within the platform.<\/p>\n Cross domain scripting is not allowed by default in Mozilla based browsers (Firefox, Camino, etc.).<\/p>\n To override this security feature you need to add the following line to your XML<\/span>HttpRequest code before issuing an open() call:<\/p>\n netscape.security.PrivilegeManager.enablePrivilege(\u201cUniversalBrowserRead\u201d);<\/p>\n This allows the user agent (browser) to ignore cross-domain scripting warnings, which are a major source of cracking attacks<\/a>.<\/p>\n There are one or two more steps required to make this work depending on whether you’re using Firefox or Camino. The following step is the same for any Mozilla borwser, be it Firefox, Camino, or any other Mozilla based web browser agent.<\/p>\n In the browser address window type:<\/p>\n about:config<\/p>\n This opens the Mozilla configuration file which you can filter using the field at the top of the screen and edit items by double clicking on them.<\/p>\n Find signed.applets.codebase_principal_support For Firefox users, this next step is also necessary: adding a capability.policy line to the user.js config file which contains all user preference settings for the browser. Regardless of which operating system you’re using, user.js does not exist by default<\/i>. Therefore, you must create this file, then add the appropriate settings into it. The settings from user.js get copied to prefs.js, which is the actual file read by Firefox.<\/p>\n On Mac OS X the correct directory to create this file within is:<\/p>\n ~\/Library\/Application Support\/Firefox\/Profiles\/[alphanums].default\/<\/p>\n On Win XP or 200:\u201cPermission denied to call method XML<\/span>HttpRequest.open\u201d<\/h2>\n
\n
\nBy default it should be set to false. Double clicking it should set it to true.<\/p>\n
\nC:Documents and Settings[User Name]Application DataMozillaFirefoxProfiles<\/p>\n