On Oct 29, 4:01 pm, Dave <[EMAIL PROTECTED]> wrote:
> As the subject says I have the follow js:
>
> ----------------
> Event.observe('events', 'change', function (e) {
>   new Ajax.Updater('event_details',
>                    'URL',
>                    { method: 'post',
>                      parameters: 'event=' +
> e.element().id.gsub('event', '') });});
>
> ----------------
>
> This is working in Firefox but not IE.  I'm kind of at a loss as to
> why it's not working. Taking a guess, maybe it has something to do
> with what IE considers a "change" to  the ol #events:
>
> ----------------
> <ol id="events">
>   <li><input id="event1" type="radio" name="event" value="Event 1" />
>     <label for="event1">Event 1</label></li>
>   <li><input id="event2" type="radio" name="event" value="Event 2" />

"event" is a pretty dangerous name to choose [1] : )

Browsers happen to do quite stupid things with named controls - e.g.
shadowing same-named global variables. In this case, IE's global
`event` (which actually references event object when event occurs) is
most likely shadowed with this input element. This means that `e' is
resolved to an element (rather than an event object) and so everything
sort of messes up.

Try to "namespace" those names - e.g. use something like "foo-uname",
"foo-password", etc. and see if the problem still exists.

[snip]

[1] http://jibbering.com/faq/names/

--
kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to