Jump to content

Change text with AJAX


self_learning

Recommended Posts

I read topic about Ajax at W3School. I made firstAjax.html. I attached it. Then I create ajax_info.txt from where I want to receive data and print on html page. But code not work.

 

Please help!

 

 

firstAjax.html

ajax_info.txt

Link to comment
Share on other sites

Many browsers prevent AJAX requests from HTML files on the local filesystem for security reasons. Firefox normally works, so you can use Firefox for testing on the filesystem. Otherwise you will need to set up a server on your computer to run it.

  • Like 1
Link to comment
Share on other sites

Many browsers prevent AJAX requests from HTML files on the local filesystem for security reasons. Firefox normally works, so you can use Firefox for testing on the filesystem. Otherwise you will need to set up a server on your computer to run it.

I think this is your answer. I used FireFox to test it and it worked fine. Didn't test in any other browsers though.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...