3

Why does the following code work in firefox and not chrome? I'm testing this locally.

Thanks.

<html>
    <head>

        <script type="text/javascript" src="jquery.js"></script>
        <script type="text/javascript">
            $(function(){
                $('#test').load('todo.xml');
            });
        </script>

    </head>
    <body>
        <div id="test">
        </div>
    </body>
</html>
usertest
  • 27,132
  • 30
  • 72
  • 94

1 Answers1

2

Chrome does not allow access to local files by default. You can get around this feature by starting Chrome from the command line:

chrome.exe --allow-file-access-from-files

Check out Nick Craver's answer for more details.

Community
  • 1
  • 1
Emmett
  • 14,035
  • 12
  • 56
  • 81