Hi, I should also say: I **strongly** recommend not using "event" as either a name or an ID (or a global function, or a global var). This is because `window.event` is special in IE (it's the current event object). Browsers try to put anything with an `id` on the `window` object as a property (so if you have <div id="foo">, you'll find that `window.foo` refers to it). This is even being standardized by the W3C. [1] But any global function or global var *also* gets added to the `window` object as a property, creating a conflict. And to make matters worse, IE throws `name`s in there as well. (Yeesh!)
So I'd use a slightly different `name` (and `id`). The `name` and `id` values can be the same for the same element, that's fine. [1] http://www.w3.org/TR/Window/ HTH, -- T.J. Crowder Independent Software Engineer tj / crowder software / com www / crowder software / com On Mar 9, 9:06 am, "T.J. Crowder" <[email protected]> wrote: > Hi, > > On Mar 9, 8:53 am, Webhopper <[email protected]> wrote: > > > I create a small form-site for booking events. > > After select an event, Ajax.Updater should update the ammount-field. > > Site :http://www.lab.krueger-de.org/sam/default_ie.asp > > > IE works correct, but Firefox, Chrome and ... dosn't update the second > > select. > > > Is here a bug in my source or a crossbrowser problem from prototype ? > > > (i have fix it temorary with json. see > > :http://www.lab.krueger-de.org/sam/default.asp) > > It's a bug is in your code; it works in IE because of a complementary > bug in IE. :-) > > Your `onchange` handler is using `$F('event')` to get the value of the > event. `$F` requires the *ID*, not name, of the field to get the value > from.[1][2] Your field doesn't have an `id`, just a `name`. > > It works on IE because IE is confused about namespaces.[3] > > [1]http://api.prototypejs.org/dom/dollar-F/ > [2]http://api.prototypejs.org/dom/Form/Element/getValue/ > [3]http://blog.niftysnippets.org/2010/03/by-any-other-name-would-smell-a... > > HTH, > -- > T.J. Crowder > Independent Software Engineer > tj / crowder software / com > www / crowder software / com -- 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 [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-scriptaculous?hl=en.
