The "Star Wars Character Profile's" page retrieves information on 85 Star Wars characters, including facts and details on their species, home world as well as films they have appeared in.
This project was my first experiment with AJAX and sending HTTP requests to 3rd party servers.
Results are displayed in a table that is refreshed for each entered URL, and upon successful retrieval of results the ability to download the data as a .csv file is presented.
Using jQuery & AJAX, HTTP get requests are made to two URL's on a 3rd party server.
The first request receives data on the total number of people in space, their names and the craft they are on.
The second request receives data on the current position of the ISS.
The received JSON data is stored in objects and the properties are accessed and used to update selected HTML elements on the web page.
Using the setTimeout method of the HTML DOM Window Object the function that requests the ISS data and updates the latitude and longitude is called every 5 seconds.
A webpage that displays the visitors IP address (and some additional location information). Using jQuery & AJAX, HTTP get requests are made to 3rd party web servers. The received data is in JSON format and the data from each request is stored in an object. The objects properties are accessed and stored as variables. HTML elements are selected based on their id’s and their contents are set to the strings stored in the variables.
Due to the “same-origin policy” and as an AJAX request is being made from one domain to another the “No 'Access-Control-Allow-Origin' header is present on the requested resource” error was encountered.
To get around this, and allow a request to be made from this domain to the 3rd party API, a proxy was used that creates requests to the 3rd party URL and includes CORS headers in the response. A proxy web server passes on the request from this site along with its headers.
At the click of a button the webpage generates a corporate buzzword loaded phrase.