jQuery load file from different directory -


i have following project structure

  -root      -app.html      -scripts/          -jquery/          locales.js      -_locales/          -en/             -messages.json 

in app.html include locales.js file in want load messages.json file this

jquery.get("../_locales/en/messages.json", function(data){     alert(data); }); 

but not work. ideas?

since using .get, need provide url access _locals/en/messages.json either absolute url or url relative page javascript running from. double check url working, try putting location bar , making sure file expect. url stands now, <currentpageurl>../_locales/en/messages.json. if works, want start debugging what's going on in .get. first, though, make sure url valid.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -