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
function WW_getlayer(idstring) { // Find layer with given label
if( WW_Netscape4 ) {
return eval("document." + idstring); }
else { // Microsoft
return eval("document.all." + idstring); }
} // End WW_getlayer()
function WW_layershiftto(obj,x,y) { // Move layer to given position
if(WW_Netscape4 ) {
obj.moveTo(x,y); }
else { // Microsoft
obj.style.pixelLeft = x;
obj.style.pixelTop = y; }
} // End WW_layershiftto(obj,x,y)
WW_messageobject = WW_getlayer('WWmessage1');
WW_layershiftto(WW_messageobject,parseInt(x),parseInt(y));
id attribute in <div> #WWmessage1 in STYLE
Returned by WW_getlayer
Read in from form as text



© 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