Google


ADBRITE ads links
You are here: CodeIdol.com > Ajax > Head Rush Ajax > Making Ajax Requests Speaking The Language > Giving Instructions To The Browser

SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

2.24. Giving instructions to the browser

Next we need to tell the browser what to do when it gets a response from the server. Remember, the browser will run the function we tell it about every time the ready state changes.

    function getCustomerInfo() {
      var phone = document.getElementById("phone").value;
      var url = "lookupCustomer.php?phone=" + escape(phone);
      request.open("GET", url, true);
      request.onreadystatechange = updatePage;Here's the name of the function
that the browser should run whenever the ready state of the request object changes.
      request.send(null) 
;Be sure you set the onreadystatechange property before calling
send(), 
 so the browser knows what to do when it gets a response.
    }


SAVE
Digg
Shown on del.icio.us del.icio.us
See Whos Talking About This on Technorati Technorati
I've Reddit reddit

You are here: CodeIdol.com > Ajax > Head Rush Ajax > Making Ajax Requests Speaking The Language > Giving Instructions To The Browser
   
Related tags







Popular Categories
Unix books and guides
AJAX popular information
C# language guides
Windows books and cookbooks
.......






© CodeIdol Labs, 2007