Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
liam johnshon
Courses Plus Student 904 Pointshow to setup XAMP
i m unable to run ajax on xamp server....
2 Answers
Ryan Chatterton
5,914 PointsIn your browser can you navigate to http://localhost/data/employees.json. it should open the file in the browser.
If not what message do you get?
Ryan Chatterton
5,914 PointsAre you able to get to http://localhost? You may need to add a port to it if you have IIS installed on your PC.
Then you just need to add your html/php file into the htdocs folder of XAMP and then navigate to your localhost url.
liam johnshon
Courses Plus Student 904 Pointsmy json file windows path C:\xampp\htdocs\ajax\data\employees.json
should i locate file like this ajx.open("GET","http://localhost/data/employees.json");
liam johnshon
Courses Plus Student 904 Pointsi did the same but xamp was not working because of port 80 being utilized by teamviewer so i free the port 80 & after that xamp able to locate file with xamp
Thanks
Ryan Chatterton
5,914 PointsGlad you got it working. I assumed it was around the port being in use. Happy learning!