Christophe Porteneuve wrote:
> Hey there,
>
> [EMAIL PROTECTED] a écrit :
> > <form>
> > <select id="id1">
> > <option>A</option>
> > <option>B</option>
>
> Use value attributes in there. See below.
>
> > </select>
> > </form>
> > <div id="id2""></div>
>
> Lose the extra quote, too. Won't imped 'cuz the browser is forgiving,
> but still.
>
> Your issue lies with Prototype 1.4 code not dealing properly with
> unspecified value attributes for <select>:
>
> opt = element.options[index];
> value = opt.value;
> if (!value && !('value' in opt))
> value = opt.text;
>
> You see, a non-specified value attribute yields value == '', which
> bool-equates to false. But the subtest ('value' in opt) will always be
> true, as the DOM node *always* features this property. So you never
> revert back to opt.text. As both your options yield the same value
> (''), there's no change detected by the Observer.
>
> I suggest getting Prototype from the trunk (or if you're not keen on
> SVN, just get script.aculo.us and snatch its prototype.js file) for now,
> which deals with missing values.
>
> I also submitted a patch recently for ol' bug #5033 [1], that
> distinguishes between unspecified attribute and empty-valued attribute.
> But that's not necessary for you: use non-empty value attributes, and
> use a more recent prototype.js file.
>
> [1] http://dev.rubyonrails.org/ticket/5033
>
indeed not using value attribute there was the cause of it in IE.
thanks you for helping me all along. you made me want to learn
javascript now :-)
> --
> Christophe Porteneuve aka TDD
> [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" 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/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---