Are you trying to use document.getElementsByTagName? Then you're
missing the document.-part (or whatever node you want to use)

this should work fine:

var first = $A(document.getElementsByTagName("td")).push("...");

As for extending an enumarable object (in this case an array)

Object.extend(Array.prototype, {
 PUSH: function(elm) {
    // code
 }
})

Ciao
Martin


On 6/28/06, Andreas Wahlin <[EMAIL PROTECTED]> wrote:
This might seem like a really daft question, but I couldn't find an
answer anywhere. How do you add something to an enumerable object?

Something like
var first = $A(getElementsByTagName('td'));
var second = $A(getElementsByTagName('tr'));
first.PUSH(second);

where the PUSH is something unknown.

am i supposed to use inject here in some way?

Andreas
_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to