richb2
08-09-2002, 03:20 AM
I have a form that has a textbox on it. In the front of it I have a label, let's call it COMPANY. I want to be able to change the text of COMPANY to FIRM programatically. I have done some research and can't find a way to modify the text. One new idea is to use layers. ie
<LAYER ID="field1">COMPANY</LAYER>
I would like to write a function
function changeLayerContent(field,text)
{
field.write(text);
}
and call it by changeLayerContent(document.getElementById("field1"),"FIRM");
When I run this I get an error document.field1.document is not an object. What is wrong or how else can I do this?
<LAYER ID="field1">COMPANY</LAYER>
I would like to write a function
function changeLayerContent(field,text)
{
field.write(text);
}
and call it by changeLayerContent(document.getElementById("field1"),"FIRM");
When I run this I get an error document.field1.document is not an object. What is wrong or how else can I do this?