Thank you Ryah! With your answer I have been able to integrate Behaviour into a Prototype class. Thank you again!!

Now I have a question related to prototype. It doesn´t transform single elements to an array?
I have this code:
var element = $("idDiv");
var array = $A(element);
alert(array.length);

the output is 0;

with this one:
var elements = $("idDiv", "idDiv2");
var array = $A(elements);
alert(array.length);

the output is 2;

What am I doing incorrectly? this is a feature or an error?

--
Daniel Herrero Dávila
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to