I'm not sure (!variable) is the same as (variable!=null) is it?
Also does IE support getAttribute() as expected? You should be testing for the presence of the method if you're using DOM.
if (obj.getAttribute && (otherTests)) { // use DOM method... } else { // do it the hard way... }
pid
⬅️ What bands did you see there Bruce, anyone good? :: Looks like he wasn't a winner ➡️
Paul Clarkeʼs weblog - I live in Hythe, Kent. Married to Clare + father to 2, I am a full-stack web engineer, and I do mostly javascript / Node, some ruby, python, php etc. I like pubs, parkrun, eating, home-automation and other diy jiggery-pokery, history, family tree stuff, TV, squirrels, pirates, lego, + TIME TRAVEL.