I know there is the origin problem, but setting up a web server is not an option here. Firefox v14 has no problem loading a local file. Chrome has no problem after adding '--allow-file-access-from-files' Is there any way to fix also IE9? Thank you
Edit: I figured out the solution. Just use ActiveXObject("MSXML2.XMLHTTP.6.0") instead of XMLHttpRequest() for IE9 to overcome the local file access deny problem.
Note that you cannot make an AJAX request to the local file system from an external domain in either browser - it would be a massive security flaw if you could. For this AJAX request to work in Chrome you need to make the request to a webserver.
jQuery - AJAX load() Method The load() method loads data from a server and puts the returned data into the selected element. Syntax: $(selector). load(URL,data,callback);
How Does It Work? AJAX stands for Asynchronous JavaScript and XML. It is used for allowing the client side of an application to communitcate with the server side of the application. Before AJAX, there was no way for the client side of a web application to communicate directly with the server.
Ajax or not. HTTP is a client-server application protocol. Without a server, that's just not possible.
UPDATE:
Possible in chrome (and firefox) apparently. As for IE you can read up on Mark of the Web.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With