The fact that IE treats names as if they were IDs is a known IE JS
issue (one of many, many known IE issues *sigh*).  If Mochikit were to
mention every known IE JS issue, half the documentation would be
nothing but (and I'm only half joking when I say that; IE's JS
handling is REALLY buggy).

So, I feel your pain, but I disagree that something should be added to
Mochikit's docs.  Being aware of (and learning how to compensate for)
the way different browsers handle Javascript is just part of the "joy"
of being a JS developer (independent of what library you use).

Jeremy

On Apr 16, 12:52 pm, ShadowPhoenix <[EMAIL PROTECTED]> wrote:
> I just wanted to let you guys know about a weird bug I found in IE6.
> The problem is actually with the way IE6 handles
> document.getElementById, but maybe you guys wanted to write a small
> workaround for it in the getElement function /shrug
>
> Also I realize this would probably never happen, but it's still a bug
> nonetheless.
>
> It seems like IE6 confuses the ID and name attributes.  Consider the
> following sample code:
>
> ====================================================
> <input type="hidden" name="foo" value="bar">
>
> <select multiple="true" id="foo">
>         <option>Bar</option>
>         <option>Baz</option>
> </select>
>
> <script type="text/javascript">
>         var obj = document.getElementById("foo");
>         alert("Object's Type Is: " + obj.type);
> </script>
> ====================================================
>
> In IE6, this will output
>         "Object's Type Is: hidden"
> However in Firefox and Opera, it will correctly output:
>         "Object's Type Is: select-multiple"
>
> If you change the order of elements; i.e, put the select box before
> the hidden input field, Firefox/Opera output the same thing, however
> IE6 outputs "select-multiple".
>
> Anyway like I said, just a heads up in case you wanted to do some kind
> of workaround.  I tested this with Mochikit 1.3.1 and the packed
> version of 1.4, and both times getElement() showed the same behavior
> as document.getElementById in IE6 and firefox.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MochiKit" group.
To post to this group, send email to mochikit@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/mochikit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to