If you think a bug might affect users in the 57 release, please set the correct tracking and status flags for Release Management.

Image with a link javascript action and alt disappears after loading

VERIFIED WORKSFORME

Status

()

Core
ImageLib
--
major
VERIFIED WORKSFORME
17 years ago
17 years ago

People

(Reporter: Balu Ramachandran, Assigned: Stuart Parmenter)

Tracking

({regression, testcase})

Trunk
mozilla0.9.2
x86
Windows 2000
regression, testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Reporter)

Description

17 years ago
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.8.1+)
Gecko/20010425
BuildID:    2001042504

I am loading images using javascript code. The images are links with javascript
actions. They have alt tags specified. The images after loading reversts to the
alt text as links. The images just disappears. I am including the HTML code with
one image. The whole code is actually JSP with lots of images which forms a
sorting tool bar inside a page. There are no frames involved.



Reproducible: Always
Steps to Reproduce:
1.Just load the HTML page
2.Some times you wont even see the image load and disappear. 
3.Right click on the alt text link and see the properties. the image is  there.
click on it. the image loads.
4. use the back button
5. almost every time I have seen the image load and revert to the alt text link

Actual Results:  image reverts to alt text link

Expected Results:  Should have displayed the image instead of the alt text as a link

<html>
<head>
<title>alex</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table cellspacing=0 cellpadding=0 border=0>
  <tr>
    <td align=right>&nbsp;</td>
  </tr>
  <tr>
    <td>
      <FORM NAME="sortSelector" METHOD="POST">
        <SCRIPT LANGUAGE="JAVASCRIPT">
               var fields = new Array(4);
               fields[0] = "Author";
               fields[1] = "Title";
               fields[2] = "Date";
               fields[3] = "Relevance";

               var alts = new Array(12);
               alts[0] = "Sort up by Author"
               alts[1] = "Sort down by Author"

               alts[2] = "Sort up by Title"
               alts[3] = "Sort down by Title"

               alts[4] = "Sort up by Date"
               alts[5] = "Sort down by Date"

               alts[6] = "Sort up by Relevance"
               alts[7] = "Sort down by Relevance"

               var language = "_en-us";
               var endName = language + ".gif";
               function sortField(control)
               {
                   var myControl = document.getElementById(control);

				  /* alert("before");
				   alert(myControl);
				   alert("after");
				  */
				   baseName = "image.gif"

                   result =  baseName
    				alert(result);
                   myControl.src = result;

                   myControl.alt = "This is the Alt Text";
               }

               </script>
        <INPUT TYPE="HIDDEN" NAME = "field">
        <INPUT TYPE="HIDDEN" NAME = "direction">
        <INPUT TYPE="HIDDEN" NAME = "token" VALUE = "asdf">

        <A name="thisIsTheAnchorName" HREF="ThisIsTheHREF">
        <img id="field1" BORDER="0"></A>
        <SCRIPT>
        sortField("field1");
        </SCRIPT>

      </FORM>
    </td>
  </tr>
</table>

</body>
</html>

Comment 1

17 years ago
Confirmed on Win2K - 2001050317

Let's also blame the DOM, not Imagelib.
Assignee: pavlov → jst
Status: UNCONFIRMED → NEW
Component: ImageLib → DOM Level 0
Ever confirmed: true
Keywords: dom0
QA Contact: tpreston → desale

Comment 2

17 years ago
Adding a testcase of the reporter's comment.
Keywords: testcase

Comment 3

17 years ago
Created attachment 33324 [details]
HTML From Reporter's Comment.
Created attachment 33337 [details]
Minimized testcase.
This is so not a DOM problem, back to imagelib. Pavlov, check out the minimized
testcase, it's trivial, yet the image isn't displayed.
Assignee: jst → pavlov
Component: DOM Level 0 → ImageLib
Keywords: dom0 → mozilla0.9.1, nsbeta1, regression
(Assignee)

Updated

17 years ago
Target Milestone: --- → mozilla0.9.2

Comment 6

17 years ago
*** Bug 77867 has been marked as a duplicate of this bug. ***

Comment 7

17 years ago
the image in the minimized testcase doesnt disappear for me anymore, using winMe
2001053009 (cvs), can anyone confirm this works correctly now?
(Assignee)

Comment 8

17 years ago
worksforme now.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → WORKSFORME

Comment 9

17 years ago
Verified with 2001-06-05-11.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.