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

JavaScript

how to setup XAMP

i m unable to run ajax on xamp server....

2 Answers

In 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?

Are 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.

my 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");

i 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

Glad you got it working. I assumed it was around the port being in use. Happy learning!