Unfortunately I need my application to be compatible with IE too... :(
What about the initialization function?
Object.extend(Form.Methods, {
initialize: function (form)
{
form = $(form);
form.property1 = 'test';
form.property2 = ['t', 'e', 's', 't'];
// and so on
}
});
This is working for stardard forms but not for dinamically created
forms (document.createElement). Why?
Is there a better way of doing this?
On 18 Dic, 17:44, kangax <[email protected]> wrote:
> On Dec 18, 11:16 am, Diodeus <[email protected]> wrote:
>
> > I don't believe html properties elements are extensible. All you can
> > do is add css class names.
>
> Actually they are. At least in Mozilla:
>
> HTMLFormElement.prototype.foo = 5;
> document.createElement('form').foo; // 5
>
> [...]
>
> --
> kangax
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---