lazytrucker
Programmer
Hi I am trying to change the classname of an object by id.
The objects and id is created in a loop however all id's are unique and passed to the change function onclick.
the process for change is:
ident=cl+seg+rec;
alert(ident)
document.getElementByid(ident).className='textRed';
The type of element is a font tag and the error returned is:
"Object doesnt support this property or method", but when using:
onclick="this.className='textRed';
on a font element it works fine any quesses as to why this is happening.
Cheers lazytrucker
The objects and id is created in a loop however all id's are unique and passed to the change function onclick.
the process for change is:
ident=cl+seg+rec;
alert(ident)
document.getElementByid(ident).className='textRed';
The type of element is a font tag and the error returned is:
"Object doesnt support this property or method", but when using:
onclick="this.className='textRed';
on a font element it works fine any quesses as to why this is happening.
Cheers lazytrucker