You are here: irt.org | FAQ | JavaScript | Form | Q1733 [ previous next ]
Netscape Navigator 4 uses separate documents for each layer. Therefore each form field you attempt to place in a layer meust be encapsulated within its own form tags, otherwise it will not render correctly.
Try using:
<html> <head> <script language="JavaScript"><!-- function updateLayer(object, text) { if (document.getElementById) document.getElementById(object).innerHTML = text; else if (document.all) document.all[object].innerHTML = text; else if (document.layers && document.layers[object]) { document.layers[object].document.open(); document.layers[object].document.write(text); document.layers[object].document.close(); } } //--></script> </head> <body onLoad="updateLayer('myLayer', '<form><input type=\'text\'></form>')"> <div id="myLayer" style="position: absolute"> </div> </body> </html>