thick box is not working in chrome

1.1k Views Asked by At

i'm using thickbox in my webpage

it's working well in firfox , ie but not working in google chrome it shows error

XMLHttpRequest cannot load file:///W:/www/pennyauction/home_page/site/flyout.html?height=315&width=185&inlineId=myOnPageContent&random=1296046181308. Origin null is not allowed by Access-Control-Allow-Origin.

Any idea about this.

Thanks in advance

1

There are 1 best solutions below

3
On BEST ANSWER

Chrome has a design policy that forbids you from using XMLHTTPRequest to load local files. Firefox does not have this policy.

Presumably you are developing on your local machine for testing purposes and will upload your files to a real server later.

The best solution for testing is to run a lightweight HTTP server on your local machine. A slightly hacky workaround is to open Chrome with the command chrome --allow-file-access-from-files, which allows you to do local AJAX temporarily.