self_learning Posted December 10, 2015 Share Posted December 10, 2015 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 More sharing options...
ShadowMage Posted December 10, 2015 Share Posted December 10, 2015 What exactly isn't working? Worked when I tried it. The two files need to be in the same folder. Link to comment Share on other sites More sharing options...
self_learning Posted December 10, 2015 Author Share Posted December 10, 2015 Dear Faal, yes these files are in same folder. When I click on button, nothing happened. There is no changing in webpage. Link to comment Share on other sites More sharing options...
dsonesuk Posted December 10, 2015 Share Posted December 10, 2015 How and where these run from? O/S folder or local server. Link to comment Share on other sites More sharing options...
Ingolme Posted December 10, 2015 Share Posted December 10, 2015 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. 1 Link to comment Share on other sites More sharing options...
self_learning Posted December 10, 2015 Author Share Posted December 10, 2015 O/S folder. Link to comment Share on other sites More sharing options...
ShadowMage Posted December 11, 2015 Share Posted December 11, 2015 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. 1 Link to comment Share on other sites More sharing options...
self_learning Posted December 11, 2015 Author Share Posted December 11, 2015 Wowww, yes its working, I am very happy, thanks to all. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now