spacer

home / experts / dhtml / column25 / addendum1
Developer News
Eclipse Helios Update Brings New PHP Tools
Internet Explorer 9 Ups Standards Support
JBoss Portal 5 Release Easier to Use

Logo

Dynamic Headline Fader, Version 2.01
accounting for expected syntax in IE4mac


The Problem

An error message, similar to the one below, appears when loading a page that contains the fader:

The Line and Char fields do not lead us to the statement that generated the error. Now, why doesn't that surprise me? There is no line 481 and once we do identify the correct statement, manually, the error is not on character 2!

The statement-in-question is this line from Version 2.0, which we inserted to hasten initial page display in IE:

setTimeout("initIt()");

In Column 25, we described the reason for this statement, and its syntax, in this way:

Explorer stops to refresh the display only if it is idle. While a script is executing, no refresh is possible. Many users complain about pages that use onload handlers to run complicated scripts. In many cases, they don't see the page until the script has finished executing, especially if the page contains tables. We therefore provide an idle time for Explorer, the smallest possible actually, by using a setTimeout() without a time interval argument. Explorer will now display the page then execute initIt().

The no time interval argument trick will not work in IE4mac. The second argument for setTimeout() is mandatory.

The Solution

We simply include the argument using a very small interval. For example, one millisecond:

function FDRcountLoads() {
   if (IE4) {
      setTimeout("FDRinit()",1);
   }
   else {
      .
      .
      .
   }
}

There are still a couple more problems to solve for IE Macintosh.


Produced by Peter Belesis and

webref The latest from WebReference.com Browse >
Flashmaps' DynamicLocator: Interactive Maps for Small Areas · Flashmaps' AreaSelector: Interactive Maps for Wide Areas · The DB Mapper: Interactive Street-level Maps of U.S. and Canada
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
MS Access and MySQL · Cisco AutoQoS: VoIP QoS for Mere Mortals · While VoIP Adoption Explodes in Enterprise, Carrier Spending Lags

All Rights Reserved. Legal Notices.
Created: Sep 21, 1999
Revised: Sep 21, 1999

URL: http://www.webreference.com/dhtml/column25/addendum1/fdr201iemac.html