Dojo reading a json file from a local filesystem using dojo.xhrGet
Posted
by pfdevil
on Stack Overflow
See other posts from Stack Overflow
or by pfdevil
Published on 2010-04-10T17:26:24Z
Indexed on
2010/04/10
17:33 UTC
Read the original article
Hit count: 719
Hello,
I'm trying to read a file from a local filesystem. I do not have a server at my disposal and thus i'm trying to do it this way. Here is what I got so far;
function init(){
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserWrite');
dojo.xhrGet(
{
url: "/json/coursedata.json",
handleAs:"json",
load: function (type, data, evt) {alert (data) },
//mimetype: "text/plain"
});
}
I'm getting this error from the firebug console;
Access to restricted URI denied" code: "1012
http://ajax.googleapis.com/ajax/libs/dojo/1.4/dojo/dojo.xd.js
Line 16
© Stack Overflow or respective owner