Closed Bug 33759 Opened 25 years ago Closed 25 years ago

document.images.complete fails if not called using the img element's name but an index

Categories

(Core :: JavaScript Engine, defect, P3)

x86
Windows 95
defect

Tracking

()

VERIFIED DUPLICATE of bug 33803

People

(Reporter: aceop, Assigned: rogerl)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; N; Win95; en-US; m14) BuildID: 2000032308 As far as I know document.images.complete should work in all the 3 following variations: <img src="somepicture" name="somename"> (may this be the number-th graphic in that page) boolean = document.somename.complete; boolean = document.images[number].complete; boolean = document.images["somename"].complete; But only the first variation seems to work. Reproducible: Always Steps to Reproduce: 1. Just load the example page (http://www.outpost.purespace.de/jsimagescomplete.htm) and click the link 2. 3. Actual Results: The method of retrieving the load status of the image giving the name suceeded, the method using the index number of the graphic in the document.images array failed. Expected Results: Show the same results for all three possible syntax variants I know this bug exists in NN4 too. In NN4 it's unpredictable and fails with the syntax using the name, too. Well, I just don't want this &$#! bug in Mozilla :-) Hope it's not only some 'feature' or new, strict variant of JS. I hate people spoiling my time, so I suppose you do so, too. Here comes the code of the example (in case the server crashes or WW 3 breaks out) <html><head><title>images[].complete test</title> <script language="JavaScript"> function check() { var Status = ""; for(i = 0; i < document.images.length; ++i) { if(document.images[i].complete == true) Status = Status + "graphic " + (i+1) + " loaded\n"; else Status = Status + "graphic" + (i+1) + " not loaded\n"; } Status = Status + document.images.length + " graphics contained in document\n"; Status += "graphic A "; if (!document.A.complete) Status+="not"; Status +=" loaded\n"; Status += "graphic B "; if (!document.B.complete) Status+="not"; Status +=" loaded\n"; alert(Status); } </script> </head><body> <img src="http://www.outpost.purespace.de/torbenow.gif" name="A"><br> <img src="noprotocol:nonexistant.noformat" name="B" alt="here is no image" width="100" height=100"><br> <a href="javascript:check();">check load state</a> </body></html>
Sure enough the server seems accessible only some of the time, however the local version demonstrates the problem easily enough - 'access disallowed...' which the Security guys are on top of. *** This bug has been marked as a duplicate of 33803 ***
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Verified duplicate.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.