Ajax Simplified

May 22, 2009

I use to think Ajax is very difficult, but as and when I dived into it, I realized its way too simple.

This is a small summary of Ajax from one of my presentation

So what is Ajax?

  • Ajax stands for Asynchronous JavaScript and XML
  • Ajax is not a new technology but a New technique for creating better, faster and interactive applications
  • The backbone of Ajax is JavaScript, XML, HTML, CSS

    The next question, how Ajax works?

    JavaScript communicates directly with the server, through the JavaScript XMLHttpRequest object.

    The XMLHttpRequest object have 3 properties onreadystatechange property , readyState property , responseText property.

    onreadystatechange property – stores the function that will process the response from a server

    readyState property – readyState property holds the status of the server’s response.

    responseText property – The data sent back from a server can be retrieved with the responseText property.

    Next question is how do we send response to the server?

    This is done through 2 methods of XMLHttpRequest object, open and send.

    open() method
    takes three arguments
    The first argument defines which method to use when sending the request (GET or POST).
    The second argument specifies the URL of the server-side script.
    The third argument specifies that the request should be handled asynchronously.

    Send() method
    sends the request off to the server.

    Entry Filed under: Ajax, JavaScript. Tags: .

    Leave a Comment

    Required

    Required, hidden

    Some HTML allowed:
    <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Trackback this post  |  Subscribe to the comments via RSS Feed


    Tags

    Accessibility Ajax css Experience HTML personal RIA standard typography Usability User Experience User Interface W3C Web 2.0 web design Web development Web Standards

     

    May 2009
    M T W T F S S
    « Dec   Jun »
     123
    45678910
    11121314151617
    18192021222324
    25262728293031

    Archives

    Top Posts

    Meta

    Recent Comments

    Blog Stats

    RSS Shyamala's Blog

    My Tweets