hello all,
i have DOM code to remove an attribute and it works in IE but not firefox, i was wondering what i am doing wrong (i guess removeAttribute isnt supported in FF)?
the code looks like this and is also attached if u want to give it a try:
.....
function processClick()
{
var SubmittedBy = document.getElementById('SubmittedBy');
//SubmittedBy.disabled = false;
//SubmittedBy.setAttribute('disabled', 'blah'); // not works
//SubmittedBy.removeAttribute('disabled');
SubmittedBy.removeAttribute('size');
SubmittedBy.removeAttribute('disabled');
It is not the removeAttribute() method, it is the improper way you have referenced the object. When using getElementById(id), make sure your object has an id. Your object has only a name, which is not the same thing. IE takes the name as an id, if no id found, but this is an incorrect and silly approach. Give your object an id.