On Thu, Nov 13, 2008 at 6:43 PM, Diodeus <[EMAIL PROTECTED]> wrote: > So how do I do this? I know I could create the element with the > onload, then set the src separately later in the code, but I would > prefer to do it all inside the new Element constructor. >
I honestly can't see the harm in doing var foo = new Element("img", { id: 'something' }); foo.observe('load', function() { // onload code here }); foo.src = myImage; $('placeholder').insert(foo); I can understand that one can find chaining the coolest thing and all, but what's with this fixation of writing everything in one line? Gabriel Gilini www.usosim.com.br [EMAIL PROTECTED] [EMAIL PROTECTED] --~--~---------~--~----~------------~-------~--~----~ 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 prototype-scriptaculous@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---