Tuesday, February 2, 2010

Describe how to create AJAX objects

Answer
Ajax Objects can be created by the following syntax:
Var ajax= New ajaxObject(‘page path’). Here page path is the URL you want the Object to call. The URL must be of the same domain as the webpage.  

Define JSON.

Answer
JSON is JavaScript Object Notation. JSON is a safe and reliable data interchange format in JavaScript. This format is easy for humans to read and machines to understand.

Explain in brief abo XMLHttpRequest object.

Answer
XMLHttpRequest object is used to transfer data between a client and a server. Here the client can be a web browser. Here, the client can send and receive data without reloading the page.
It can be created as follow
Var request = new XMLHttpRequest ()

Describe the formats and protocols used by AJAX.

Answer
  • Ajax uses HTTP’s GET or POST. AJAX also uses XMLHttpRequest protocol for requesting to the web server.
  • AJAX uses JSON format to communicate between client and server. UED or URL encoded data formats can also be used.  

0 Comments: