elvie
05-05-2004, 02:07 PM
Hi there,
got a function that's supposed to change the class and type of a element from hidden to text depending on user input.
the initial element is hidden:
<input name="newUcompanyVatNum" type="hidden" class="" id="newUcompanyVatNum" value="" size="40" maxlength="60">
and I've got a function which to change the class, type:
document.getElementById('newUcompanyVatNum').className = "RequiredTextBox";
document.getElementById('newUcompanyVatNum').type = "text";
it's changing the class, but not the type? ie is saying that Could not get the type property. this command is not supported
Have I just got the syntax wrong? how do I change the type to text?
Thanks in advance
got a function that's supposed to change the class and type of a element from hidden to text depending on user input.
the initial element is hidden:
<input name="newUcompanyVatNum" type="hidden" class="" id="newUcompanyVatNum" value="" size="40" maxlength="60">
and I've got a function which to change the class, type:
document.getElementById('newUcompanyVatNum').className = "RequiredTextBox";
document.getElementById('newUcompanyVatNum').type = "text";
it's changing the class, but not the type? ie is saying that Could not get the type property. this command is not supported
Have I just got the syntax wrong? how do I change the type to text?
Thanks in advance