Basic HTML version of Foils prepared 11 March 99

Foil 62 Changing Content of a DHTMLLayer

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 62
1 function processbutton3() { // Process content from form text field
2 var inputstuff = WW_formlayer.document.classtest.textchoice.value;
3 if(WW_Netscape4) { // Netscape
4 WW_messageobject.document.open();
5 WW_messageobject.document.writeln(inputstuff);
6 WW_messageobject.document.close(); }
7 else { // Microsoft is much more elegant
8 WW_messageobject.innerHTML = inputstuff;
9 WW_messageobject.style.width = 300; }
10 // Seemingly Netscape clips text layer to width of text; Microsoft to width of window; both clip vertical height to that of text; this is typical difference between
11 today's erratic implementations of DHTML
12 WW_layertotop(WW_messageobject); // Set layer zindex to 1000
13 WW_layershow(WW_messageobject); // Make layer visible
14 return;
15 } // End processbutton3()
16 Note in Netscape full address is
17 window.document. layer.document. property

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