[Javascript] removeAttribute issue IE7
Terry Riegel
riegel at clearimageonline.com
Tue May 4 09:30:59 CDT 2010
if you are calling
> div.removeAttribute('class')
Then after that it would be null.
For Example if you have something like...
<div class="blah"></div>
then removeAttribute would make it something like...
<div></div>
and correspondingly div.className='' would make it something like...
<div class=""></div>
Hope this helps.
Terry
On Apr 19, 2010, at 1:11 PM, jeffrey morin wrote:
> Hey everyone,
>
> I am editing a script that is having issues in IE7 and can't figure this
> out. A radio button has an onclick event handler and when it is fired it
> calls a script that removes a class name from a div element. For whatever
> reason it doesn't work for IE7 though.
>
> It is very straight forward and says just this.
>
> var div = document.getElementById('div')
> div.removeAttribute('class')
>
> I threw an alert in there to give the class name and Ie returns it as null.
> The weird thing is that when I just use div.className = ' ' it works just
> fine. Does anyone know what is going on here? I am stumped.
>
> Thanks,
> - J
> _______________________________________________
> Javascript mailing list
> Javascript at lists.evolt.org
> http://lists.evolt.org/mailman/listinfo/javascript
More information about the Javascript
mailing list