ࡱ> Root EntryDOb.*FileHeaderZDocInfoKBodyText 9b. 9b.')(+,-./012345679:;<=>?@ABCDEFGRoot Entry;H/#FileHeaderZDocInfoIGBodyText 7H/9H/  !"#$%&'()*+,-./0123456789:;<=>?ABCDEFGHJKLMNOPQRSTUVXY[\]`abcdefgijklmnopqrstuvwxyz{|}~HwpSummaryInformation.@ PrvImage PrvTextDocOptions ;H/;H/Section0h Scripts ;H/;H/JScriptVersion ^ DefaultJScriptW_LinkDoc_ Ch. 17: A Touch of AJAX " the Asynchronous JavaScript and XML: use AJAX to retrieve data Introduction to AJAX - Without AJAX, a web application might make the visitor wait while a response is gathered from the web server. - An AJAX-based application sends requests from the web browser to the web server in the background (asynchronously). - This chapter explores how you can send requests and receive responses using a fundamental AJAX object: XMLHttpRequest. " the XMLHttpRequest object - Since the release of Windows IE 7, you use the XMLHTTPRequest object in the same way across all major browsers. .show()/.hide() function: show and hide elements of a page ! These functions set the Cascading Style Sheets (CSS) display property. ! To hide an element, you set the display property to none. Example) Chaper23\llisting23-1.html //<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"> </script> // Now click the (x). The element disappears from the page // setGIF89aɻxxxkkk]]]PPPCCC555((( d`LH00`Hذ̘`H0|pdXL@`0H `H0`dHL`H0xp`XH@0d LȰ``HH00dLؘȀ`H0xp`XH@d0L `H0d`LH`H0|pdXL@0`$H`dHL00`HذȘdL0xp`XH@0` HdH0ȳ``HHdL0xp`XH@`0H Ը̰ĠऀؘpȈXxHp@h@d8`8X0xT0pH dxddxd`d`p`|``x`p``x`!, H*\ȰÇ#JHŋ3jȱǏ CIɓ(S\ɲ˗0cʜI͛8sɳϟ@ JѣH*]ʴӧPJJիXjʵׯ`ÊKٳPP \˶m݄n龽a^sʅ _ G{p佊+7v/f65MfШS^ͺװcW!m|7ߎ[0Cߋ͓ɂV|2ϛK^2 7]0Ͽ(nYV_噖_GЅvQ!xv ($8cx'nᕝAn]`(&f݌7׎Acv6yȹُ&6PA22y}-'|['g-icdifK5h%MEX؉8!#d~yڒ΍'\v i#qgg&YأF8 VI!t觠l[5[9eoRY(>'})M'+*>IR:䝹UZ>ޜ,Yav+. Tƥqː![O;ylmj]Iga\IkDb9X S"l8N,muԭ{,4l8<@-DmHwX]y0pJi Ke&ƴL`d}'-𳺆 0WdKq=pIg1̀,Bm2M&j\?f$ޞ^-k #砇.؉RH7O`|xov`"+|C&tܹηKy;/K;So;o4Յڬ˟ɍ L9pu\b6}SZ ,Ƒi3]M2V8mKw:*w-NrwUiͫz?65 JnRIM[,[yHE3gv" 5"V]uB9cb:f5fo֪H%ySz:@L\b2n❑0E>fF (GIJ2qsP)Wɓ<%ve950ݬ(xCV 0I}Tv#f:Ќ4;2E%!MZ!I:-+!!Y`a``a`0x( 8   Introduction to C\օ2003D 1 7| T֔|, 10 17  sec-7, 5, 10, 583 WIN32LEWindows_Unknown_Version@*G@9H/@IN32LEWindows_Unknown_VerWMhA~;;٤_:VJ'AFkU)" DP۶䠇BH+*X= gf66Y |߼7$!5`IZ|xSR-MVJ#tX"`towqtLߛȎT y\"Ana*k6='ZAٽwss<,pVPK)$313E A^rUV?V?K,7L % 4.,.6͘dV&5"*s:SrneRTCO:}W'bШBdLMFhP֜($7wXkP:1qeY<_[ ĺO+yb.aFk֊c!3%#!p+>~y FyCnAs-ho@.?t- mba`")Ff]kv^ r p109p p3Eu@DO 6C,H,#GB!k0~ 6*7=M*Z:ҙ#?*?ӿT@Y~X+mj3'm[v|:j)%C$Mϼ5#O 6C,H,#GB!k0~ 6*7=M*Z:ҙHWP Document Filecd߈@Y~X+mj3'm[v|:j)%C$Mϼ5#To hide an element, you set the display property to none. Example) Chaper23\llisting23-1.html //<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.1.min.js"> </script> // Now click the (x). The element disappears from the page // sto none does not remove thVOoU]$&HDBJ)&)R#[{n|p"GG@9R7~^;Afg~3۷:8B->lU:xFWa`%}7kXO+.<gN'u<[K;?95w7 TlU ya_x&k._IM))SǕ=K:xVوO(vt2F3#=˶2c-m~"ΉFK?Bk#m8fZr̘ |^2-yྣ(iY&7)[s˨>jO~'G_]8F/=~ǴO}#WCB#i>w%2BIUkH(3OhCu҈}Dbؕq_`{ωa>LۣP>2Pv c]Fm}ֶ,S^!(Qx+ǂ4붱',d"<Z8$+ UASX#ӑߤlYFg _0wg} DZXa;{.g1=eXbi %9V$uG?*>cf}%G̫a(B_h#(82nȸ)D&ql{i쥸DiN3Xi83QlMEzelu(|a4uG5Q.7qugҾ=|wSKr(ѥǑW %~[sݏG$ҷ$&4HG2me,2\ҥsUJǯRw>6JqR춈L>zXf]GCq+qY+6Z otE\c=;ʸ=S.~J҆P;2asx6`2&R}ش.=|ޒ,rt9Ci /yc9;/CFbI,kHcu޳\fvfKAWoTMLCZPfRM "$*Tu֛% BB EBqC8Szƍ7.vHloffƩ]C}jSVȥvĿ9SDo9f|5Ktғz^z9$[NݙdiZڇƐ%m (.*HHư-v8b:&c߬-] `W b: RMC6#-[tUCdgN .bC,g%gqDrNnȲ=\vbwMP<͔gYD&}ߦwm6C\w\MmNsoi<dV,jR]?dw2dV';Gc8-=B2z #ߓ ϟ{Ά@86 Ξq <37D5<\[؂Qux]q\RF̭[_Sb)á2 /l]ae4-,ɉSy,R 6k<>8K)K׶O;PJcXS}(