I am getting access denied when using dojo. below is my code:
it fails loading dojo.require("dijit.layout.LayoutContainer");
is this because of cross domain scripting?
the module below is hosted @ orkut.com
<?xml version="1.0" encoding="UTF-8" ?>
/* GeSHi (C) 2004 - 2007 Nigel McNie (http://qbnz.com/highlighter) */
.javascript .imp {font-weight: bold; color: red;}
.javascript .kw1 {color: #000066; font-weight: bold;}
.javascript .kw2 {color: #003366; font-weight: bold;}
.javascript .kw3 {color: #000066;}
.javascript .co1 {color: #009900; font-style: italic;}
.javascript .coMULTI {color: #009900; font-style: italic;}
.javascript .es0 {color: #000099; font-weight: bold;}
.javascript .br0 {color: #66cc66;}
.javascript .st0 {color: #3366CC;}
.javascript .nu0 {color: #CC0000;}
.javascript .me1 {color: #006600;}
.javascript .re0 {color: #0066FF;}
function request() {
dojo.require("dijit.layout.LayoutContainer");
dojo.require("dijit.layout.ContentPane");
dojo.require("dijit.layout.LinkPane");
dojo.require("dijit.layout.SplitContainer");
dojo.require("dijit.layout.TabContainer");
dojo.require("dojo.parser"); // scan page for widgets and instantiate them
var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest("VIEWER"), "viewer");
req.add(req.newFetchPeopleRequest("VIEWER_FRIENDS"), "viewer_friends");
req.send(response);
debugger;
}
function response(data) {
/*
var viewer = data.get("viewer").getData();
var name = viewer.getDisplayName();
var thumb = viewer.getField(opensocial.Person.Field.THUMBNAIL_URL);
var profile = viewer.getField(opensocial.Person.Field.PROFILE_URL);
profile = 'http://sandbox.orkut.com' + profile;
var html = '<img src="' + thumb + '"/>';
html+='<a href="' + profile + '" target="_top">' + name + '</a>';
document.getElementById('main').innerHTML = html;
*/
}
]]>

are you trying to load JS
are you trying to load JS from a different subdomain? If so then yes, XD scripting restrictions will prevent that..
ie: mysite.domain.com is different from yoursite.domain.com even if they are the same server, same domain, same IP....
-Karl
You can try a cross domain
You can try a cross domain build (see bottom of page) to solve this issue, or if you just need to load some dojo modules, you can use the AOL CDN (which is a cross domain build). The latest available version on the CDN is Dojo 0.9, but 1.0 will be up once the official release is done.