[Prototype-core] Re: Form.Element.present() also for select boxes

2009-02-18 Thread perk
On Feb 15, 9:08 pm, kangax kan...@gmail.com wrote: On Feb 14, 7:25 pm, perk phieduren...@gmail.com wrote: At first I thought this was a cross-browser issue of Prototype when Form.Element.present() used on a select box returned true on Firefox but not on IE when a non-empty OPTION field

[Prototype-core] Re: Form.Element.present() also for select boxes

2009-02-18 Thread kangax
On Feb 18, 1:00 pm, Tobie Langel tobie.lan...@gmail.com wrote: Form#present checks for a falsy value. So that wouldn't be appropriate for select elements. consider the following: Actually, right now it checks for an empty string and so doesn't catch IE's falsy `null`: ... present:

[Prototype-core] Re: Form.Element.present() also for select boxes

2009-02-18 Thread Tobie Langel
`hasValue` as a replacement to `present` or as a wrapper around `getValue().empty()`? The former. Element#present just sounds weird for SELECT elements, imho. And hasValue seems consistent with the rest of the API (get|set| has)Value. In general, I'm not excited about adding another method

[Prototype-core] Re: Form.Element.present() also for select boxes

2009-02-15 Thread kangax
On Feb 14, 7:25 pm, perk phieduren...@gmail.com wrote: At first I thought this was a cross-browser issue of Prototype when Form.Element.present() used on a select box returned true on Firefox but not on IE when a non-empty OPTION field was selected. Later then, I realized that this method