08.01.2015 Views

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

Beginning Web Development, Silverlight, and ASP.NET AJAX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

264<br />

CHAPTER 11 ■ <strong>AJAX</strong> APPLICATIONS AND EMPOWERING THE WEB USER EXPERIENCE<br />

Figure 11-4. Running the Ajax Multiplier<br />

The full listing for the client page is shown in Listing 11-3.<br />

Listing 11-3. The Full Ajax Client<br />

<br />

<br />

<br />

<strong>AJAX</strong> Multiplier Client<br />

<br />

var ajaxRequest<br />

function init<strong>AJAX</strong>()<br />

{<br />

try<br />

{<br />

ajaxRequest = new XMLHttpRequest();<br />

}<br />

catch(error)<br />

{<br />

ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");<br />

}<br />

}<br />

function h<strong>and</strong>leInput()<br />

{<br />

var T1 = document.getElementById("Text1");<br />

var T2 = document.getElementById("Text2");<br />

var theURL = "Multiply<strong>AJAX</strong>Server.aspxnx=" +<br />

T1.value + "&ny=" + T2.value;

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!