This content is focussed on JavaScript events and basic Ajax:
All content here (AJAX sample) delivered to the browser over the HTTP protocol and not using the FILE protocol because the JavaScript makes use of HTTP requests through the XMLHttpRequestObject.
Taking the list of Javascript events here and the file blusher.html, implement four new event handlers.

Event 1: onLoad can be use to run script as soon as the page is loaded. such as getting data from the server.
Event 2: onclick can be use to increase user setisfaction. such as calling javascript function to validate data.
Event 3: onChange can also be use to validate form, such as the value's input box will be validated as soon as it change
Event 4: onClick can also be use to to change back gound colour. this could be usefull for people to change the background colour of a website acording to their style.
Ajax error hendling
The file ajaxbutton.html was requested to a non-existent file from the server. When button has been pressed nothing happen.
Ajax provide basic error handling which incase this error occure. Providing as follow:

Error message provided if HTTP status = 404
so by createing else which mean that http status = 404 is included.
Ajaxbutton2.html
A second button was added to ajaxbutton2.html, when the button is pressed, it display a second image in specify area.The getData() function was re-used but the paramater is diferent (show on picture below)
