Closed Bug 307261 Opened 19 years ago Closed 16 years ago

javascript image name error can't find object with name

Categories

(Firefox :: General, defect)

x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: adudek, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

In the page http://rekord.magma-net.pl/ffbug/ menu shold work after second click
and the image near "rozwijane menu0" should be replaced instead in firefox menu
hangs up and the javascript console produces error after the first click and the
image name is not found but image with secified name exist

Reproducible: Always

Steps to Reproduce:
1.Click "menu rozwijane 0" link
2.read javascript console error
3.find iut that this object exists and script works under different browsers

Actual Results:  
menu "hangs up"

Expected Results:  
replace the image near text and with the next click hide the subpositions
(1)JavaScript Error when link of "menu rozwijane 0" is clicked :
> Error: menu0 is not defined
> Source File: http://rekord.magma-net.pl/ffbug/
> Line: 44 

(2)Definition of the "menu rozwijane 0" :
> <a class="menu" href="javascript:zmien(0)"><img ... id='menu0'>...</a>

(3)Function definitions : (shortened for readability)
> function zmien(co) { kopia = co;
>  if (stanMenow[co]) { i = dlugoscMenow[co]; zwin(co);   }
>  else               { i = 0;                rozwin(co); }
>  stanMenow[co] = !stanMenow[co];
> }
> function rozwin(menuID) {
>  if (i <= dlugoscMenow[menuID]) {
>     wykonaj("menu" + menuID + "-" + i, "block",menuID)
>     clearTimeout(czas)
>     czas = setTimeout("rozwin(kopia)", 20)
>     i++
>    }
>  nr = "menu" + menuIDl
>  eval(nr).src = gora.src <== This is the line of "menu0 is not defined" error.
> }

(4)But the site says it is "Strict HTML"...
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict//EN">

Is "document.all" supported even when "Standard compliance mode"?
Evang bug?
There is at least one workaround:
 Writing "document.getElementById(nr).src=...;" instead of "eval(nr).src=...;" 
(I think this is normal way)
This doesn't work
1.tried it
2.if i use document.GetElementById(...)....no browser accept that
3.This sould be fixed anyway!!!
(In reply to comment #2)
> 2.if i use document.GetElementById(...)..., no browser accept tha

Dudek, I believe that almost all browsers never accept document.GetElementById(),
even if almost all bowsers usually accept document.getElementById()" as W3C
compliant behaviour... :-)
The testcase is gone. The last comment probably fixed the issue.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.