4.1 AJAX Essentials
Before making an AJAX enabled webpage accessible there must first be an understanding of the coding behind AJAX. The JavaScript is used to make page requests to the server and process the response. The requests are sent to the server by the JavaScript XMLHttpRequest object.
“The XMLHttpRequest object is supported in Internet Explorer 5.0+, Safari 1.2, Mozilla 1.0 / Firefox, Opera 8+, and Netscape 7.”( Refsnes Data, 2008).
The tutorial shows step by step how to create a JavaScript class to handle an AJAX request. This class is used in all the examples. The constructor of a JavaScript class uses the prototype property. The use of ‘prototype’
“which is considered to be the prototype upon which new objects of that type are created” (Zakas, 2005)