spacer

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

home / programming / javascript / netscape6 123456
[next]

JavaScripting Netscape 6: No More Sloppy Code

Sr. Programmer/Analyst
Professional Technical Resources
US-OR-Portland

Justtechjobs.com Post A Job | Post A Resume
Developer News
Metasploit 3.2 Offers More 'Evil Deeds'
'Thank You Apple. Seriously.'
The Buzz: BlackBerry App Store Seen Next

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 Whitepaper: Innovative Collaboration to Advance Your Business
Internet.com eBook: Real Life Rails
Avaya Article: Call Control XML - Powerful, Standards-Based Call Control
Tripwire Whitepaper: Seven Practical Steps to Mitigate Virtualization Security Risks
Internet.com eBook: The Pros and Cons of Outsourcing
Go Parallel Article: Scalable Parallelism with Intel(R) Threading Building Blocks
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
Go Parallel Article: James Reinders on the Intel Parallel Studio Beta Program
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
Go Parallel Article: Getting Started with TBB on Windows
HP eBook: Storage Networking , Part 1
MORE WHITEPAPERS, EBOOKS, AND ARTICLES
Webcasts
Go Parallel Video: Intel(R) Threading Building Blocks: A New Method for Threading in C++
HP Video: Is Your Data Center Ready for a Real World Disaster?
Microsoft Partner Portal Video: Microsoft Gold Certified Partners Build Successful Practices
HP On Demand Webcast: Virtualization in Action
Go Parallel Video: Performance and Threading Tools for Game Developers
Rackspace Hosting Center: Customer Videos
Intel vPro Developer Virtual Bootcamp
HP Disaster-Proof Solutions eSeminar
HP On Demand Webcast: Discover the Benefits of Virtualization
MORE WEBCASTS, PODCASTS, AND VIDEOS
Downloads and eKits
Microsoft Download: Silverlight 2 Software Development Kit Beta 2
30-Day Trial: SPAMfighter Exchange Module
Red Gate Download: SQL Toolbelt
Iron Speed Designer Application Generator
Microsoft Download: Silverlight 2 Beta 2 Runtime
MORE DOWNLOADS, EKITS, AND FREE TRIALS
Tutorials and Demos
IBM IT Innovation Article: Green Servers Provide a Competitive Advantage
Microsoft Article: Expression Web 2 for PHP Developers--Simplify Your PHP Applications
Featured Algorithm: Intel Threading Building Blocks - parallel_reduce
MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES
webref The latest from WebReference.com Browse >
Popular JavaScript Framework Libraries: An Overview · Controllers: Programming Application Logic - Part 2 · How to Use JavaScript to Validate Form Data
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Choosing the Right Online Backup Provider · Mother Avaya Nurtures Her Technology Partners · Software as a Service a Winning Model for Hotspot Provider


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


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