Example of Firefox problem with JavaScript URL

The following is based on an example from Sun.
http://docs.sun.com/source/816-6408-10/image.htm
The example works ok when used with http://www.cs.ucl.ac.uk/staff/W.Langdon/image1.gif etc. But firefox fails when images are specified by JavaScriptURL giving error messages such as:
Error: theXbm is not defined
Source File: theXbm[4]
Line: 1

This code works with Netscape 7.2 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) but fails with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070216 Firefox/1.5.0.10 Reported 371633 to bugzilla. See also 355365.

Bad patch?

Cf. https://bugzilla.mozilla.org/show_bug.cgi?id=329521

dom.disable_image_src_set

dom.disable_image_src_set should be set to false

Cf. http://forums.mozillazine.org/viewtopic.php?p=2746754&sid=eda479519928a145efe6f656b617055b Open about:config, then filter on dom. and check whether dom.disable_image_src_set has been toggled to true. If so, toggle it back to false.

Example 4: JavaScript animation.

The following example uses JavaScript to create an animation with an Image object by repeatedly changing the value the src property. The script begins by preloading the 10 images that make up the animation (image1.gif, image2.gif, image3.gif, and so on). When the Image object is placed on the document with the IMG tag, image1.gif is displayed and the onLoad event handler starts the animation by calling the animate function. Notice that the animate function does not call itself after changing the src property of the Image object. This is because when the src property changes, the image's onLoad event handler is triggered and the animate function is called.



[Animation]
W.B.Langdon 25 Feb 2007 (last update 26 Feb)