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
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
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
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
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
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
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