Sample Window 4: Source Code

/* Window 4 */
function winFour() {
   if (getBrowser() == "M2" ) {
      alert('Sorry! The self referential code needed for this\ndemo is not supported by the Microsoft JScript.')}
   else {
   win4 = open("","Sample4","width=370,height=260");
   win4.creator = self;
   win4.document.write("<html><head><title>Notes</title>");
   win4.document.write("<BODY BGCOLOR=#848afd TEXT=#ffffff>");
   win4.document.write("<center>Press Update after editing and watch the main text box</center>");
   win4.document.write("<form name='noteForm'>");
   win4.document.write("<center><input type='button' value='Update' 
            onClick='creator.document.winExample.winText.value = document.noteForm.note.value'></center><br>");
   win4.document.write("<textarea name='note' rows=8 cols=40 wrap='virtual'>");
   win4.document.write(document.winExample.winText.value);
   win4.document.write("</textarea></form></center></body></html>");
   win4.document.close()
	}
}

<textarea name='winText' rows=2 cols=48 wrap='virtual'></textarea>
<input type='button' name='source3' value='Source'