[thelist] setAttribute in IE 5

Erik Mattheis gozz at gozz.com
Sat Mar 30 17:10:00 CST 2002


This is works in NS 6, but not IE 5.5 Win or IE 5 Mac:

if (document.getElementById) {
   obj = document.getElementById('div1');
   if (obj.setAttribute) {
     newTop = 'top:' + (obj.getAttribute('top') + 100) + 'px';
     obj.setAttribute('style',newTop);
   }
}

Have tried everything that seemed like it would make sense ... how do
you use setAttribute in IE, or is it just there for the heck of it?
--

__________________________________________
- Erik Mattheis

(612) 377 2272
http://goZz.com/

__________________________________________



More information about the thelist mailing list