Scripting for 5th Generation Browsers and Beyond - Part I - (2/7)
Scripting for 5th Generation Browsers and Beyond
What Is A Standard Anyway?
I have already mentioned coding by W3C standards, but what makes more sense to me is that the standard that matters most is what is currently supported by both browsers without having to rely on proprietary methods and consequently conditional branches. That is not to say I am not an advocate of W3C standards, because the reality is I believe in this fundamental concept and support it as much as possible.
However, I am constantly drawn back to the practical as opposed to strictly coding
by W3C methods, particularly when both browsers have the same implementation for a method. For
innerHTML which is not a W3C recommendation is supported by both Netscape 6
and Internet Explorer, so to me it makes sense to take advantage of this powerful technique. For
example: (live example)
For all intents and purposes the standard that matters most is what is common
to both browsers. At least that is how I typically approach things; to find the common denominator
for both browsers. In many ways, the future looks a lot brighter as more DOM related methods get
implemented into browsers. For example, Internet Explorer 6 now supports the
In fact if you work through the DOM tips examples at http://www.Webreference.com/js/tips/ you will find that quite a few things that were not working in Internet Explorer 5 and 5.5 now work with Internet Explorer 6. The point being that common standards between browsers are frequently being updated and it's a developer's "duty" to keep a keen eye on the changes that are occurring. Thus it is not just the W3C we need to keep an eye on for new recommendations, but also what the new browsers have in common that fall outside of the W3C recommendations realm. Both are equally important.
For the moment though we need to focus on the here and now, so let us begin by taking a look at how to retrieve elements.
- Code Reduction
- What Is A Standard Anyway?
- Retrieving Elements
- Rollover Fun with
- Four State DOM Rollovers with a Single Image
- Creating Elements
- CSS Dynamic Manipulation
Created: August 16, 2001
Revised: August 16, 2001