View Full Version : FireFox removeAttribute doesnt work

05-16-2006, 04:45 PM
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


<div onClick="processClick()">Click HEREEEEEEEEEEEEE</div>

<select name="SubmittedBy" disabled="disabled" size="3">

05-16-2006, 05:09 PM
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.

05-16-2006, 05:34 PM


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum