Forum Moderators: open
- John
if (document.getElementById) {
// do something
}
Will almost always fail in older browsers or browsers not supporting document.getElementById. So I don't need to jam up my JS with a bunch of ifs and else's for browsers, it works or I provide a non-JS solution. :-)
If I **had** to know this I'd probably examine my script and compare the methods against the various support of those methods in the JS documentation.