about Cross Domain Dojo Resource Loading

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kokababu
    New Member
    • Jul 2008
    • 39

    about Cross Domain Dojo Resource Loading

    I am trying to load dojo module from different domain; such as dojo.parser, dijit.form.Text Box etc.

    Code:
     <html>
    	<head>
    	   <script type="text/javascript">
    		djConfig = {
    			isDebug: true,
    			parseOnLoad: true,
    			xdWaitSeconds: 10
    		};
    	  </script>
    	<script type="text/javascript" src="http://somedomain.com/toolkit/dojo-release-1.2.3/dojo/dojo.js"></script>
    	<script type="text/javascript">
    		dojo.registerModulePath("dojo", "http://somedomain.com/toolkit/dojo-release-1.2.3/dojo");
    		dojo.require("dojo.parser");
                    dojo.require("dijit.form.TextBox");
    	</script>
    
    	<script type="text/javascript">
    		dojo.addOnLoad(function(){
    			alert("Loaded");
    		});
    	</script>	  
    	</head>
    	<body>
    	</body>
    </html>
    But I am getting error from FireFox 3:

    failed loading http://somedomain.com/toolkit/dojo-r...bug/firebug.js with error [Exception... "Access to restricted URI denied" code: "1012" nsresult: "0x805303f4 (NS_ERROR_DOM_B AD_URI)" location: "http://somedomain.com/toolkit/dojo-release-1.2.3/dojo/dojo.js Line: 16"]

    I am not sure what I am missing here. I followed the example listed
    on the dojo site: http://www.dojotoolkit.org/node/17

    Can anyone please help me about this issue?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Three points:

    1. Have you followed all the steps, particularly the last section at the bottom: Making a "XDomain" build?

    2. The example is different: you don't have useXDomain set to true in the config, for example.

    3. It seems to be complaining about firebug. Try disabling it to see if it makes a difference.

    Comment

    Working...