I am trying to create a website on which I post my data in Google spreadsheets and show the data to the user in my browser using dojo.
However, I get an error
Access to restricted URI denied" code: "1012
when the browser collides:
var stateStore = new dojox.data.CsvStore(
{url: "http://spreadsheets.google.com/pub?key=p0jvMlPF5YqcUllrbwZzQBg&output=csv&gid=0",
label: "name"});
when replacing it with a locally saved copy of the same CSV works fine.
From what my Google searches have said, this is due to security restrictions in modern browsers that try to protect you from cross-site scripting attacks. Of course, I would like to somehow be able to "whiten" this domain for my page.
Any suggestions?
Full HTML
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
@import "dojo-release-1.2.3/dijit/themes/tundra/tundra.css";
@import "dojo-release-1.2.3/dojo/resources/dojo.css"
</style>
<script type="text/javascript" src="dojo-release-1.2.3/dojo/dojo.js"
djConfig="parseOnLoad:true, isDebug: true"></script>
<script>
dojo.require("dojox.data.CsvStore");
dojo.require("dijit.Tree");
dojo.require("dojo.parser");
</script>
<script type="text/javascript">
var stateStore = new dojox.data.CsvStore({url: "http://spreadsheets.google.com/pub?key=p0jvMlPF5YqcUllrbwZzQBg&output=csv&gid=0", label: "name"});
</script>
</head>
<body class="tundra">
<div dojoType="dijit.Tree" store="stateStore" labelAttr="name" label="States"></div>
</body>
</html>
Thanks in advance, Animesh
source
share