Blog2005 ≫ RE: More Javascript - 4175

⬆️More Javascript

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

⬅️ :: ➡️

Paul Clarke's weblog - I live in A small town. 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.