|
Q1733 How do you dynamically write a form field to a layer so Netscape displays it?
irt.org | Knowledge Base | JavaScript | Form | Q1733 [ previous next ]
Q1733 How do you dynamically write a form field to a layer so Netscape displays it?
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>
|
Feedback on 'Q1733 How do you dynamically write a form field to a layer so Netscape displays it?'
|
|
Copyright © 1996-2008 irt.org, All Rights Reserved.