Use Dojo Grid in OpenSocial Gadget

194 views Asked by At

I try to use a dojo grid in an opensocial gadget, it happens always that the framework try to fetch DataGrid.js from
http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/../dojox//grid/DataGrid.js, and it fails.

But in a normal html my app works fine and it can fetch DataGrid.js from
http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojox//grid/DataGrid.js.

1

There are 1 answers

1
mschr On

OpenSocial has limited the use of cross-domain requests. I believe the common workaround is to relay via their proxy like so;

<script src="http://api.msappspace.com/proxy/relay.proxy?opensocial_url=http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/dojo.js" data-dojo-props="async:true"></script>