I need to extend all form elements with some properties. To add my own
methods, I use:

Object.extend(Form.Methods, {
    method1: function ()
    {
    },
    method2: function ()
    {
    },
    ...
});

Element.addMethods();

I don't know if this is the right way but it works.

So, how can I add my own properties too? Is there a way to have an
initialization function automatically called on every form element? I
tried extending Form.Methods with the initialize() function but it
seemed not to work for forms created with document.createElement
('form').

Any suggestion?

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

Reply via email to