damon2003
11-14-2003, 07:00 AM
Hi,
how can I reference a textfield by ID instead of its name.
<input type="text" name="A. Catalogue"size="2" maxlength="2" id="cat">
i.e. to reference by name I would use the following
var a=document.form1.A. Catalogue.value;
It is easier to leave the name with spaces as it is as other scripts rely on it ( I didnt write the original)
I dont think this works because of the spaces or does anyone know how to reference this even with spaces. So how I reference this using the ID value?
thanks
how can I reference a textfield by ID instead of its name.
<input type="text" name="A. Catalogue"size="2" maxlength="2" id="cat">
i.e. to reference by name I would use the following
var a=document.form1.A. Catalogue.value;
It is easier to leave the name with spaces as it is as other scripts rely on it ( I didnt write the original)
I dont think this works because of the spaces or does anyone know how to reference this even with spaces. So how I reference this using the ID value?
thanks