spacer

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

home / experts / javascript / column30


Netscape Navigator's Problems

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

As previously discussed, we have found a few serious problems with Netscape Navigator's layers implementation. Although we worked around them, we wanted to summarize what we found. Avoiding these problems in your scripts can save you a lot of debugging and frustration.

The first problem is the inability to call a function after we load a layer with an HTML feed. In both makeFirstPage() and makeSecondPage() functions, any continuation of the function must be done through a delayed execution via the onload event handler. Here is the makeFirstLayer() again:

function makeFirstPage() {
  firstPage = new Layer(Gwidth,canvas);
  firstPage.src = Gsrc;
  upperPage = firstPage;
  firstPage.onload = makeSecondPage;
  firstPage.onMouseOver = stopScrolling;
  firstPage.onMouseOut = scrollPages;  
}

Any attempt to call the makeSecondPage() directly and immediately, or any call to any function for that matter, will result in a broken scroller.

The same problem applies in the makeSecondPage() function:

function makeSecondPage() {
  secondPage = new Layer(Gwidth,canvas);
  secondPage.src=Gsrc;
  secondPage.onMouseOver = stopScrolling;
  secondPage.onMouseOut = scrollPages;
  lowerPage = secondPage;
  secondPage.onLoad = launchScroller;
}

Any attempt to call the launchScroller() immediately and directly, or any other function for this matter, will result in a broken scroller.

The third problem is the need to return true from the rotatePages() function:

function rotatePages() {
        if (upperPage == firstPage) {
        upperPage = secondPage;
        lowerPage =firstPage;
        return true;
        }
        upperPage=firstPage;
        lowerPage=secondPage;
        return true;
}

Any attempt to remove the return true; statements will break the scroller after a few cycles.

http://www.internet.com

Produced by Yehuda Shiran and Tomer Shiran

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: November 23, 1998
Revised: November 23, 1998

URL: http://www.webreference.com/js/column30/problems