[Prototype-core] Re: Cant disable button tag. (input type="button" works ok)

2008-05-09 Thread Pablo Impallari
Wow! That was fast! Thanks you very much. Im impressed. :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Prototype: Core" group. To post to this group, send email to prototype-core@googlegroups.com To unsubscribe f

[Prototype-core] Re: Cant disable button tag. (input type="button" works ok)

2008-05-07 Thread John-David Dalton
The getValue and setValue, use the Form.Element.Serializers anyway. So when I added serialization it adds the getValue and setValue. The browser sees the innerHTML of the button element as its value so this is consistent. - JDD --~--~-~--~~~---~--~~ You received th

[Prototype-core] Re: Cant disable button tag. (input type="button" works ok)

2008-05-07 Thread kangax
That's not quite what I was talking about : ) How about just extending buttons with enable/disable and serialize? (and i.e. keeping getValue/setValue logic consistent) Are there other ones that would make sense? - kangax On May 7, 12:27 pm, John-David Dalton <[EMAIL PROTECTED]> wrote: > Patched

[Prototype-core] Re: Cant disable button tag. (input type="button" works ok)

2008-05-07 Thread John-David Dalton
Patched to work with getValue, setValue. http://github.com/jdalton/prototype/commit/3b03b76660bc29ba5d8a6ef4e06c99c8faded107 Unit tests: http://github.com/jdalton/prototype/commit/101d23d64aba2c0c459c97fa684a9079a7beb140 --~--~-~--~~~---~--~~ You received this mess

[Prototype-core] Re: Cant disable button tag. (input type="button" works ok)

2008-05-07 Thread kangax
John, I don't think it's a good idea to give buttons full "Form.Element interface". While enable/disable would work correctly, getValue/ setValue would yield unexpected results. Giving buttons a method which doesn't work as documented could be unintuitive, imho. - kangax On May 7, 10:42 am, John

[Prototype-core] Re: Cant disable button tag. (input type="button" works ok)

2008-05-07 Thread John-David Dalton
Patches here: http://github.com/jdalton/prototype/commit/723c26518392d838cf9ec368eddfba0c1874bac1 and http://github.com/jdalton/prototype/commit/8eaae75066531993eba13df5eb1469016435843b they need unit tests though :) --~--~-~--~~~---~--~~ You received this message

[Prototype-core] Re: Cant disable button tag. (input type="button" works ok)

2008-05-07 Thread kangax
You could do: Element.addMethods('button', { enable: Field.enable, disable: Field.disable }) At first, I thought it's a bug, but now I see that "button" elements don't quite work as regular form controls - i.e. button's "value" is updated by modifying its contents (rather than changing its v