As Nicolás pointed out, making Element.update change src attribute of
an image is NOT the way to go. Not only is it unintuitive but
redefining existent methods could lead to some serious bugs in future
maintenance/upgrades, etc. If you feel like Element.writeAttribute is
too verbose, I would suggest to define a simple wrapper:

Element.addMethods('IMG', {
  setSrc: function(element, src) {
    return $(element).writeAttribute('src', src);
  }
})

...

$('myImage').setSrc('images/blah.jpg');


Best,
kangax
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/prototype-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to