spacer

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

home / programming / javascript / netscape6 / test

Onload Test Cases

Developer News
Google Chrome Playing Catch-Up on Extensions
Open Solutions Alliance Gets New Leadership
Red Hat Spacewalk Expands Linux Management

Some newer browsers do not behave identically to older DHTML-capable browsers when loading external JavaScript files, especially when dynamically written. What follows is a series of simplified test cases designed to test whether browsers successfully load and execute external files.

External JavaScripts in HEAD

window.onload example 1
external script using SCRIPT SRC, onload assigned in BODY tag (works as expected)
window.onload example 2
external script using document.write SCRIPT SRC. onload handler contained within same SCRIPT block. (doesn't work in NS6/IE5)
window.onload example 3
external script using document.write SCRIPT SRC. onload handler specified outside script block. (works in NS6/IE5)

External JavaScripts in BODY

window.onload example 4
external script using document.write SCRIPT SRC. onload handler outside SCRIPT block. (see 3)
window.onload example 5
external script using document.write SCRIPT SRC. onload handler assigned inside external file.

External JavaScripts that Reference HTML Elements

Flipper example 6
external script using document.write SCRIPT SRC. Original news flipper code (executable outside onload function). (see 3)
Flipper example 7
external script using document.write SCRIPT SRC. News flipper with executable inside onload function.
Flipper example 8
external script using document.write SCRIPT SRC. News flipper with executable inside onload function, onload handler assigned inside external file.

One remaining conundrum is in JavaScript.com's scroller related to dynamically writing external files. When we doc.write both the headlines and scroller code in the head it works fine in NS6, but when we move the doc.write of the scroller code to the end of the body it doesn't. We'll continue to investigate this, let me know if you have any suggestions. For now we're SSIng the scoller code at the end of the body for speed.

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
Review: Lenovo ThinkPad SL300 · OCZ PC3-10666 Gold 2x1GB Review · Apple Recommends Antivirus for Macs

 



Created: Feb. 19, 2001
Revised: Mar. 2, 2001

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