JasonDavis Posted April 12, 2011 Report Share Posted April 12, 2011 Hi all, I'm trying to learn how to perform an AJAX request. Here's my sample project: http://www.jasonrobertdavis.net/ajax1/ There are three files: index.html, ajax.js, and ajax.txt. I'm just trying to load some text from ajax.txt. I added an alert dialog box that says "see this?" to troubleshoot - and it's popping up several times. I would expect it to pop up just once as the mrAjax onreadystatechange function runs and replaces my div text. Also when running this on my local browser I get this error: XMLHttpRequest cannot load file://(shortened)/ajax.txt. Cross origin requests are only supported for HTTP. ajax.js:30Uncaught Error: NETWORK_ERR: XMLHttpRequest Exception 101 Not sure what I'm doing wrong.. Thanks! Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.