I think $A() only converts an array to a Enumerable... not a single object...
try $A([element]) ... this should work
hth
On 3/28/06, Daniel Herrero <[EMAIL PROTECTED]> wrote:
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
--
Mit freundlichen Grüßen
Siegfried Puchbauer
_______________________________________________ Rails-spinoffs mailing list Rails-spinoffs@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs