RE: More Javascript - 4175

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... }

⬅️ :: Looks like he wasn't a winner ➡️
Sun Nov 20 2005

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