Try Element.update()

Note, clear causes problems with h1-h6 elements in IE.



On May 5, 12:37 am, evolutional <[EMAIL PROTECTED]> wrote:
> as I see prototype has not yet got something like a simple clear
> Method for DOM elements, though it would be  easy.. to do such a
> thing, would'nt it ? If you have already such a thing.. simply prove
> me wrong, but since not I would suggest somthing like this
> Element.clear(); :
> done that with your lovely addMethods functionality to extend the
> Element Class, which is pretty nice to add some  extra functionality
> with an object oriented $() extended style.
> Element.addMethods({
>    clear: function(element){
>         var elementToClear = $(element);
>         if((elementToClear) && (elementToClear.childNodes)){
>                 for(var i = elementToClear.childNodes.length-1;
> elementToClear.childNodes.length > 0 ;i--){
>                         var node = elementToClear.childNodes[i];
>                         element.removeChild(node);
>                 }
>         }
> regards Thomas
You received this message because you are subscribed to the Google Groups 
"Prototype: Core" group.
To post to this group, send email to prototype-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 

Reply via email to