Hi,
I am having a problem referencing just created form.
The: document.bForm.submit(); works fine if the
form is created as a fixed HTML, but when
created dynamically, it does not work.
No errors, just nothing.
This line:
alert("name:" + document.bForm.name);
will not do anything either?

So the questions is:
HOW do you reference objects craeted on the fly?

Thanks,
Zenon


======== code of my test ========
<html>
<head>
<title>T1</title>
<script language='javascript'>

function sendBuffer() {

sContent='<form name="bForm" action "phpserver.php">First Name <input type="text" name="f1" value="John"> <br> Last Name <input type="text" name="f2" value="Doe"><br></form>';

alert(sContent);

lyrHTML = document["formLyr"].document;
lyrHTML.open();
lyrHTML.write(sContent);
lyrHTML.close();

//alert("name:" + document.bForm.name);
document.bForm.submit();
// ............the two lines above do not work
}
</script>


</head>
<body>
<H2>Dynamic Form test for Netscape 4.*</H2>

<a href="javascript:sendBuffer()">Create and submit the form</a>

<div id="formLyr" style="position:absolute; width:254px; height:76px; z-index:1; left: 295px; top: 83px;visibility: visible;">
</div>

</body>
</html>