A DOM1/DOM2 DHTML JavaScript Experiment

YAMF
onMouseOver Event
Type=banner
Justify=right
View=visible
Rate=50
XGapAdj=0
IPath=images/
IExt=gif
angAware=false
Effect=dither
Direction=left
Angle=225.0
Scale=1.0
YGapAdj=0
IPrefix=yamf
Reverse=false
YAMF OFF!

  

Temperamental onLoad After Reload

Netscape 6 (as of version 6.1PR1) fails to execute the <BODY> onLoad event under certain circumstances when the page Reload function is selected. The only workaround for this is to not depend on the <BODY> onLoad event if you expect a Reload to occur in that browser version.

document.images[id].complete Property Dependency

The document.images[id].complete (where id is the image number) property always returns false in Netscape 4 unless the <IMG> name attribute is present. This does not appear to be a problem with Netscape 6 or Internet Explorer 5/6. In fact, it also seems to work in Netscape 3. This property is supposed to return true when the referenced image has loaded successfully. The workaround is to use the name attribute in the <IMG> tag or create your own myComplete property and set it true using the <IMG> onLoad event handler.

Below is an example of each of these methods:

name Attribute Method

<BODY>
  <IMG SRC="SomeImage.gif" WIDTH=20 HEIGHT=80
       NAME="SomeName">
  <SCRIPT>
    imageLoaded = document.images[0].complete
  </SCRIPT>

onLoad Event Handler Method

<HEAD>
  <SCRIPT>
    document.images[0].myComplete=false;

    function setComplete(IMG) {
      IMG.myComplete=true;
    }
  </SCRIPT>
</HEAD>
<BODY>
  <IMG SRC="SomeImage.gif" WIDTH=20 HEIGHT=80
       onLoad="setComplete(this)"> 
  <SCRIPT>
    imageLoaded = document.images[0].myComplete
  </SCRIPT>

PreviousNext


YAMF - "Yet Another Mouse Follower"

All Is Not What It Seems

Netscape 6 Made Me Do It!

Testing - To Reload or To Restart?

Browser Sniffing - Parse or Presence?

Avoiding JavaScript Errors on Earlier Browsers

Stopping Annoying Auto-Scroll in DOM2 Browsers

Netscape 6 is Pixel Picky

Inline Style Constraint on Internet Explorer 5

Must Use <LAYER> tag in Netscape 4 to perform DHTML

!DOCTYPE Compliance Mode

Take Care Not to Render in <HEAD> Section

Automatic Expansion of Relative URLs

The Elusive Netscape 4 Layer Elements

Temperamental onLoad After Reload

document.images[id].complete Property Dependency

Search Method Does Not Return Boolean Value

Regular Expression Global Flag Fails With Subsequent Usage

Conclusion

Resources

Downloads

Roll Your Own
  
YAMF
onMouseOver Event
Type=banner
Justify=right
View=visible
Rate=50
XGapAdj=0
IPath=images/
IExt=gif
angAware=true
Effect=dither
Direction=left
Angle=315.0
Scale=1.0
YGapAdj=0
IPrefix=yamf
Reverse=false
YAMF OFF!

YAMF
onMouseOver Event
Type=banner
Justify=center
View=visible
Rate=50
XGapAdj=0
IPath=images/
IExt=gif
angAware=true
Effect=dither
Direction=left
Angle=45.0
Scale=1.0
YGapAdj=0
IPrefix=yamf
Reverse=false
YAMF OFF!

YAMF
onMouseOver Event
Type=banner
Justify=center
View=visible
Rate=50
XGapAdj=0
IPath=images/
IExt=gif
angAware=true
Effect=dither
Direction=left
Angle=135.0
Scale=1.0
YGapAdj=0
IPrefix=yamf
Reverse=false
YAMF OFF!

Copyright © 2002-2003, ProjectIt, All Rights Reserved Last Revised: