spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / programming / javascript / domscripting / 1 To page 1current pageTo page 3To page 4To page 5To page 6To page 7
[previous][next]
Developer News
Mandrake Linux Founder Back, Virtually
Amazon: We're a Technology Company
Sun Expands MySQL With Closed Source

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 example 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)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Write Content to Layer</title>
<script>
<!--
function writetoLyr(name, message) {
        document.getElementById(name).innerHTML = message;
        }
//-->
</script>
</head>
<body>
  <a href="javascript:writetoLyr('contentLayer', 
              '<p>Eddie Was Here </p>')">
    Write Something to the Layer
  </a>
<div id="contentLayer" 
     STYLE="position: absolute; left: 400px; top: 300px; 
     width: 370px; height: 0px; z-index: 6; 
     visibility: visible border: none "> 
 </div>
</body>
</html>

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 replaceData() method which is handy for manipulating text strings. Try this Doc JavaScript tip in Internet Explorer 6:

http://www.Webreference.com/js/tips/010202.html

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.

Contents:

home / programming / javascript / domscripting / 1 To page 1current pageTo page 3To page 4To page 5To page 6To page 7
[previous][next]

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

Whitepapers and eBooks

Symantec Whitepaper: Converging System and Data Protection for Complete Disaster Recovery
Intel Whitepaper: Comparing Two- and Four-Socket Platforms for Server Virtualization
IBM Solutions Brief: Go Green With IBM System xTM And Intel
HP eBook: Simplifying SQL Server Management
IBM Contest: Are You the Next Superstar? Join the "Search for the XML Superstar" Contest to Find Out
Intel PDF: Quad-Core Impacts More Than the Data Center
Intel PDF: Virtualization Delivers Data Center Efficiency
Go Parallel Article: PDC 2008 in Review
Avaya Article: Communication-Enabled Mashups: Empowering Both Business Owners and IT
Intel Whitepaper: Building a Real-World Model to Assess Virtualization Platforms
PDF: Intel Centrino Duo Processor Technology with Intel Core2 Duo Processor
Microsoft Article: Build and Run Virtual Machines with Hyper-V Server 2008
  Go Parallel Article: Q&A with a TBB Junkie
IBM Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
IBM eBook: The Pros and Cons of Outsourcing
Internet.com eBook: Best Practices for Developing a Web Site
IBM CXO Whitepaper: The 2008 Global CEO Study "The Enterprise of the Future"
Avaya Article: Call Control XML in Action - A CCXML Auto Attendant
IBM CXO Whitepaper: Unlocking the DNA of the Adaptable Workforce--The Global Human Capital Study 2008
Adobe Acrobat Connect Pro: Web Conferencing and eLearning Whitepapers
Symantec Whitepaper: Comprehensive Backup and Recovery of VMware Virtual Infrastructure
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview - Part 3 · Accessing Your MySQL Database from the Web with PHP · Working with the DOM Stylesheets Collection
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Fixing MySQL Replication · Firewall Guide: First Steps to Securing the Enterprise · VoxOx Tames the Tumultuous Communications Tangle


Created: August 16, 2001
Revised: August 16, 2001


URL: http://webreference.com/programming/javascript/domscripting/1/2.html