With some Java I add some fields to my page. Later I want to set their
value. However, I get the message that the fields have no properties.

In code it looks as follows:

<form name="MainForm" action="procform.php">
Yourname: <input name=yourname value=horse size=10><br>
<div id=RecArea></div>
<input type=submit>
</form>

Sometimes I need more fields. So I  have a button that starts the following
code:

  RecAreaElt = document.getElementById("RecArea");
  RecAreaElt.innerHTML = RecAreaElt.innerHTML
        +"<input name=field1 length=20>";
  document.MainForm.field1.value="Testvalue";

The field is created, but the attempt to set/change its value gives the
message "document.MainForm.field1 has no values" in the JavaScript console.
It does work in IE.

I am using Mozilla 0.9.2

Does anyone know abou this? Is it a bug? Am I doing something that is not
allowed in Mozilla?

Thanks,
Wim



Reply via email to