views:

56

answers:

2

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!

A: 

Here's a good read. http://groups.google.com/group/jquery-en/msg/14925da1b4540acd?pli=1

May or may not help

Zane Edward Dockery
+2  A: 

This is the result of a bug fix in Chrome.

Run Chrome with the --allow-file-access-from-files option to fix this problem. Or, move your code on a Web server (instead of using file://).

strager
Can I ask how I would enable this option in Chrome? Do I add this to the executable command line?
Gary
Never mind, that was what I had to do. Thanks!
Gary