I’m creating a demo that must be in html code only (no server side code such as PHP, etc). I’d like to use jquery and the .load function to call in some content dynamically. This is working fine in Firefox, but for some reason the page I want to get is not loading in Chrome (v 5.0).
The code I am using is very simple:
$("div#contentarea").load("ajax/page.html");
and yet the contents of page.html do not load. I’ve tried putting standard HTML header tags in (<html>, <head>, <body>, etc) and also leaving them out (leaving them out usually works best) of the page.html file.
Because this works in Firefox, I am not seeing any error messages in Firebug.
Thanks in advance for any help!
This is the result of a bug fix in Chrome.
Run Chrome with the
--allow-file-access-from-filesoption to fix this problem. Or, move your code on a Web server (instead of usingfile://).