spacer

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

home / programming / javascript / netscape6 123456
[previous]
Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Summary

Scripting for NS6 and IE5.5 takes special care to adhere to standards and good programming practices. Each browser acts differently for external scripts, and you must be careful to encapsulate your element-dependent executable within functions called onload. Netscape 6 is particularly sensitive to improperly nested HTML when executing dynamically loaded scripts. By following these best coding practices, and coding for the DOM, you can ensure your scripts will work for current and future generations of browsers.

Steps for supporting NS6 with your HTML+CSS+JavaScript

  1. Properly Nest all HTML Tags
  2. Properly Close all HTML Tags
  3. Validate your HTML
  4. Validate your CSS
  5. Choose the appropriate DOCTYPE, if any
  6. Encapsulate element-dependent JavaScript within onload functions
  7. Define onload handers within external files, or subsequent SCRIPT blocks

We've provided some test cases to illustrate the problems that we discussed, and also some workarounds.

Further Reading

# # #

About the author: Andrew B. King is the founder and Managing Editor of WebReference.com. He holds a BSME and MSME from the University of Michigan. He's been creating Web sites since 1993 and still can't find time for his own home page. He has written for Web Techniques, MacWEEK, and contributed to HTML and Web Publishing Secrets, by Jim Heid. Special thanks go to Dan Ragle of internet.com and Bob Clary of Netscape for their help in researching this article. Andy can be reached at aking@internet.com.

home / programming / javascript / netscape6 123456
[previous]

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

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

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


Created: February 15, 2001
Revised: Mar. 6, 2001


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