Basic HTML version of Foils prepared 11 March 99

Foil 63 Capturing Events in Today's DHTML

From Overview of JavaScript II -- From Cookies to Dynamical HTML CPS616 Technologies of the Information Age -- Spring Semester 99. by Geoffrey C. Fox (Tom Scavo)

DHTML Utilities and Second DHTML Example in html and text for Foil 63
1 function WW_pageisloaded() { // Initialize when page loaded
2 if(WW_oldbrowser)
3 return;
4 if( WW_Netscape4 ) { // Netscape
5 window.captureEvents(Event.CLICK);
6 window.onclick=WW_processclick; }
7 else { // Microsoft
8 document.onclick=WW_processclick; }
9 WW_pointerlayer = WW_getlayer('WWpointerblock'); // Pointer
10 WW_pointerlayer.onmouseover = WW_overpointerblock; // Mouse Over
11 WW_pointerlayer.onmouseout = WW_offpointerblock; // Mouse Out
12 WW_pointermessageobject = WW_getlayer('WWpointermessage');
13 if(!WW_Netscape4 ) { // Microsoft set layer width
14 WW_pointermessageobject.style.width =200;
15 WW_pointerlayer.style.width=64; }
16 return;
17 } // End WW_pageisloaded()
18 Capture ALL Click events and set handler
19 Set event handlers for mouse events captured
20 in conventional way

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Thu Mar 11 1999