Basic HTML version of Foils prepared 11 March 99

Foil 60 Set Positions of a Layer in 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 First DHTML Example in html and text for Foil 60
1 function WW_getlayer(idstring) { // Find layer with given label
2 if( WW_Netscape4 ) {
3 return eval("document." + idstring); }
4 else { // Microsoft
5 return eval("document.all." + idstring); }
6 } // End WW_getlayer()
7 function WW_layershiftto(obj,x,y) { // Move layer to given position
8 if(WW_Netscape4 ) {
9 obj.moveTo(x,y); }
10 else { // Microsoft
11 obj.style.pixelLeft = x;
12 obj.style.pixelTop = y; }
13 } // End WW_layershiftto(obj,x,y)
14 WW_messageobject = WW_getlayer('WWmessage1');
15 WW_layershiftto(WW_messageobject,parseInt(x),parseInt(y));
16 id attribute in <div> #WWmessage1 in STYLE
17 Returned by WW_getlayer
18 Read in from form as text

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