spacer

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

home / programming / javascript / netscape6 123456
[next]

JavaScripting Netscape 6: No More Sloppy Code

Senior Developer
I T Search
US-NE-Kimball

Justtechjobs.com Post A Job | Post A Resume
Developer News
Sir Tim Talks Up Linked Open Data Movement
From L.A. to Vegas With 100GbE
Salesforce Rolls Out Big Summer '08 Update

By Andrew King

Abstract

This article shows how to adapt your JavaScript and HTML to support Netscape 6 and the DOM. Using real-world examples we illustrate several common coding techniques that fail in DOM-compliant browsers, and offer some solutions. Essentially, Netscape 6 forces you to clean up your sloppy code.

Netscape 6's Heritage

Netscape's Netscape 6 (NS6) and Mozilla are based on an earlier version of the Gecko rendering engine, a massive open source project spearheaded at mozilla.org. NS6 claims to be the most standards-compliant browser out there with support for DOM 1/2, CSS1/2, HTML 4.01, and ECMA-262.3 while Internet Explorer 5.5 (IE5.5) supports DOM 1 and CSS 1 with partial support for CSS 2. Therefore it is possible to code cross-browser for NS6/Mozilla, IE 5.5, etc. when using DOM 1 and CSS 1. This DOM-based coding technique leverages the work you need to do to support NS6 and should work in future versions of all DOM-compliant browsers. (IE 5+ supports both the W3C's DOM and their own DOM so you have a choice between the past and the future).

Introduction

Go to a DHTML-enabled site today with Netscape 6 (NS6) or Internet Explorer 5.5 (IE5.5) and you may see nothing, or worse yet, an error. Many pre-DOM scripts don't work on these newer browsers, usually due to invalid HTML, outdated sniffing techniques, or code based on proprietary extensions of one browser or another.

In the process of updating our DHTML news clients for WebReference.com and JavaScript.com, we discovered some puzzling problems in NS6 and IE 5.5. We found NS6 to be less tolerant of sloppy HTML and non-modularized JavaScript. Improperly nested tags caused incomplete page loads, external JavaScript files didn't load, onloads didn't fire, and other timing problems occured for no apparent reason. At WebRef we're here to ease your pain. Using real-world examples we document common scripting techniques that fail in these DOM-compliant browsers, and present some solutions that are browser-independent and standards-based.

You have a choice. You can keep updating your code for each new browser iteration with browser-specific fixes or you can adopt an API (like Doc JavaScript's) or code for the DOM.

Contents

home / programming / javascript / netscape6 123456
[next]



JupiterOnlineMedia

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

Solutions
Whitepapers and eBooks
IBM eBook: Planning a Service Oriented Architecture
IBM eBook: Choosing the Right Architecture--What It Means for You and Your Business
Microsoft Article: Will Hyper-V Make VMware This Decade's Netscape?
Avaya Article: Using Intelligent Presence to Create Smarter Business Applications
Intel Go Parallel Article: Getting Started with TBB on Windows
Microsoft Article: 7.0, Microsoft's Lucky Version?
Avaya Article: How to Feed Data into the Avaya Event Processor
IBM Article: Developing a Software Policy for Your Organization
Microsoft Article: Managing Virtual Machines with Microsoft System Center
Intel Go Parallel Article: Intel Threading Tools and OpenMP
HP eBook: Storage Networking , Part 1
Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
HP Video: StorageWorks EVA4400 and Oracle
HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Red Gate Download: SQL Toolbelt and free High-Performance SQL Code eBook
Iron Speed Designer Application Generator
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
Silverlight 2 App and Walkthrough: Leverage Silverlight 2 with SQL Server and XML
IBM Article: Enterprise Search--Do You Know What's Out There?
HP Demo: StorageWorks EVA4400
Microsoft Article: The Progress and Promise of Deep Zoom
Microsoft How-to Article: Get Going with Silverlight and Windows Live
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Book Review: Head First JavaScript · Web Hosting Control Panels · Use Your Blog for Fast Search Engine Rankings
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
NetApp's Virtual Storage Strategy Crystallizes · F/MC Watch: A Cisco-Centric Approach · Olympic Time Trials Use Wi-Fi Mesh


Created: February 15, 2001
Revised: Apr. 26, 2001


URL: http://webreference.com/programming/javascript/javascript/netscape6/