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>

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.