Not only IE and Opera, of course firefox, look at this code
<script src="prototype.js"></script>
<input type="text" value="this should be returned" name="test"
id="www" />
<input type="text" value="this should not be returned ff2.0 bug not
appeared in ff3.0 a5"
name="test" id="www" />
<script>
alert($("www").value)
window.setTimeout(function(){alert($("www").value)},1000)
</script>
This page give out the same result on ie opera safari, but in ff2.0,
the second alert return the second id matched element, and I have
downloaded the ff3.0 alpha5, it give the result which the ie opera
gives, and be different with ff2.0, so I believe this is may be a
gecko 1.8* rendering problem, and be fixed in the gecko 1.9*, even the
firefox has some problems on getElementById, so do not care too much
about that thing.
On Jun 18, 11:07 pm, Радослав Станков <[EMAIL PROTECTED]> wrote:
> I really think that name and id should be different no to overload $()
> with more functionality.
> Besides it is easy to catch such error if there are names equal to ids
> even in complicated JS scripts.
>
> here http://video.yahoo.com/video/play?vid=410472near 10 minute to
> see more problems with IE and Opera with getElementById
>
> p.s. In my last project I found that I was call $ over 7070 times
> when I pass throw main features in 3-5 minutes, and think on IE what
> will happen if we have additonal $$ or some stuff like that !
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---