I'm having some problems with a class I am creating. My end goal is to be able to instantiate a class and use its return value as a particular object.
So far, here's my code: SomeDiv = Class.create ({ initialize: function () { obj = new Element("div"); return obj; } }); Event.observe(window, 'load', function() { $('otherDiv').appendChild(new SomeDiv()); }); Firebug says: "Node cannot be inserted at the specified point in the hierarchy" so my guess is that it is not creating the div object. Any suggestions? Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---