Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 3

AJAX = Asynchronous JavaScript and XML.

AJAX is not a new programming language, but a new way to use existing standards. AJAX is the art o exchanging data with a server, and updating parts o a web page ! without reloading the whole page. AJAX is about updating parts o a web page, without reloading the whole page.

"hat #ou Should Already $now


%e ore you continue you should have a basic understanding o the ollowing& '(ML ) X'(ML *SS JavaScript ) +,M

- you want to study these sub.ects irst, ind the tutorials on our 'ome page.

"hat is AJAX/
AJAX = Asynchronous JavaScript and XML. AJAX is a techni0ue or creating ast and dynamic web pages. AJAX allows web pages to be updated asynchronously by exchanging small amounts o data with the server behind the scenes. (his means that it is possible to update parts o a web page, without reloading the whole page. *lassic web pages, 1which do not use AJAX2 must reload the entire page i the content should change. 3xamples o applications using AJAX& 4oogle Maps, 4mail, #outube, and 5aceboo6 tabs.

'ow AJAX "or6s

AJAX is %ased on -nternet Standards


AJAX is based on internet standards, and uses a combination o & XML'ttp7e0uest ob.ect 1to exchange data asynchronously with a server2 JavaScript)+,M 1to display)interact with the in ormation2 *SS 1to style the data2 XML 1o ten used as the ormat or trans erring data2

AJAX 3xample 3xplained


(he AJAX application above contains one div section and one button. (he div section will be used to display in ormation returned rom a server. (he button calls a unction named loadXML+oc12, i it is clic6ed& <!DOCTYPE html> <html> <body> <div id="myDiv"><h2>Let AJAX cha !e thi" te#t<$h2><$div> <b%tto ty&e="b%tto " o clic'="loadX(LDoc)*">Cha !e Co te t<$b%tto > <$body> <$html> 8ext, add a 9script: tag to the page;s head section. (he script section contains the loadXML+oc12 unction&

<head> <"c+i&t> ,% ctio loadX(LDoc)* .... AJAX "c+i&t !oe" he+e ... / <$"c+i&t> <$head>

You might also like