SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 45 | Next

Robin Pars, Laurence Moroney, and John Grieb

"Foundations of ASP.NET AJAX"

forms[0].elements['TOT'].value=xmlHttp.responseText;
}
}


CHAPTER 1 ?–  INTRODUCING AJAX 13


width="300" border="0" >












First Valueonkeyup="updateTotal();">
Second Valueonkeyup="updateTotal();">
Returned Total




When the web page loads, the createXMLHttpRequest function is called (as a result of
setting the onload event handler in the body tag) to create the XMLHttpRequest object. After
that, whenever a key is pressed in the A or B text boxes, the updateTotal function is called
(by trapping the onkeyup event on the two text boxes).
The updateTotal function takes the values of A and B from their form elements and
uses them to build the URL to Default2.


Pages:
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57