Wednesday, July 5, 2017

AJAX

AJAX = Asynchronous JavaScript And XML


Ajax is a set of Web development techniques using many Web technologies on the client side to create asynchronous Web applications.

With Ajax, Web applications can send data to and retrieve from a server asynchronously (in the background) without interfering with the display and behaviour of the existing page.

AJAX is not a programming language and not a single technology, but rather a group of technologies. HTML and CSS can be used in combination to mark up and style information.

AJAX just uses a combination of:
  • A browser built-in XMLHttpRequest object (to request data from a web server)
  • JavaScript and HTML DOM (to display or use the data)

How AJAX Works?


  1. An event occurs in a web page (the page is loaded, a button is clicked)
  2. An XMLHttpRequest object is created by JavaScript
  3. The XMLHttpRequest object sends a request to a web server
  4. The server processes the request
  5. The server sends a response back to the web page
  6. The response is read by JavaScript
  7. Proper action (like page update) is performed by JavaScript
  • The XMLHttpRequest Object
    • The XMLHttpRequest object can be used to exchange data with a server behind the scenes.
    • Create an XMLHttpRequest Object
      • variable = XMLHttpRequest();
    • XMLHttpRequest Object Methods
  • AJAX - Send a Request To a Server
    • The XMLHttpRequest object is used to exchange data with a server.
    • Send a Request To a Server Methods

    • GET
    • POST

    • OPEN A File








No comments:

Post a Comment

My First Day with Uki DN Cohort 1

 "Hello WORLD!"