Setting image.src via Javascript doesn't reload image

RESOLVED DUPLICATE of bug 176926

Status

()

Core
DOM: Core & HTML
RESOLVED DUPLICATE of bug 176926
15 years ago
10 years ago

People

(Reporter: shakahshakah, Assigned: jst)

Tracking

Trunk
x86
Windows 2000
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

15 years ago
In Build ID 2002102704, setting image.src via Javascript doesn't reload the
image. Works in previous versions of Mozilla (don't know exactly when it broke,
but it seems like sometime in October) and in IE.

Will attach sample HTML file that demonstrates the problem, but in a nutshell
the assignment in the following Javascript block has no effect:

  <SCRIPT TYPE="text/javascript" LANGUAGE="JavaScript1.2">
  <!--
    function doImageSwitch() {
      alert(document.getElementById("the_image").src) ;
      document.getElementById("the_image").src =
"http://images.slashdot.org/topics/topicprogramming.gif" ;
      alert(document.getElementById("the_image").src) ;
    }
  //-->
(Reporter)

Comment 1

15 years ago
Created attachment 104661 [details]
simple page that uses Javscript to change the src attribute of an image

The calls to alert() demonstrate that the .src attribute is not being set by
the assignment.

Comment 2

15 years ago

*** This bug has been marked as a duplicate of 176926 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → DUPLICATE

Updated

10 years ago
Component: DOM: Core → DOM: Core & HTML
QA Contact: stummala → general
You need to log in before you can comment on or make changes to this bug.