Brad -
You cannot remove and re-create DOM elements corresponding to Button
instances without breakage. Call the "destroy" method on each Button
instance to remove it from the DOM. Do this before the DOM of the
parent form is modified in any way. If you re-insert the form, you will
need to re-instantiate each Button.
- Todd
snadly wrote:
>
> I am using the YUI button object and I have a simple question (I think).
>
> Lets assume that my button is attached to an element name 'boo'. If
> 'boo' is removed from the DOM via javascript, what happens to the
> button? Does it just turn in to an invalid object?
>
> Is there a way to detect when items are removed from the DOM via YUI?
> Like the reverse of onContentReady?
>
> The reason I ask is because I use the YUI button in a form that is
> shown, removed, and then re-inserted in to the DOM. When the form is
> re-inserted I can't seem to get the button to attach to the control a
> the second time.
>
> Thanks,
>
> Brad
>
>