This repo contains exercises to introduce students to AJAX.
These exercises assume some previous knowledge of JavaScript and basic DOM interaction.
- Clone this repo
- Start a local web server in the main directory
- Load the file in your web browser from your local server
- Instructions can be found in the JavaScript files. Starting with
js/basic-ajax.js
Web browsers will not allow AJAX requests to be made against the local filesystem for security reasons.
This means that you cannot simply drag the index.html
file onto your browser to view this exercise; you must run a local web server.
Assuming you have Node.js and npm installed:
# install the npm "serve" module globally
sudo npm install -g serve
# cd into the directory you want to run your local web server
# start the web server
serve
# serve should show some output to your terminal with a URL
# load that URL in your browser to view this exercise