Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Button Question   Message List  
Reply | Forward Message #30904 of 52119 |
Re: [ydn-javascript] Button Question

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
>
>




Tue May 13, 2008 9:39 pm

toddkloots
Offline Offline
Send Email Send Email

Forward
Message #30904 of 52119 |
Expand Messages Author Sort by Date

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...
snadly
Offline Send Email
May 2, 2008
11:41 pm

Brad - You cannot remove and re-create DOM elements corresponding to Button instances without breakage. Call the "destroy" method on each Button instance to...
Todd Kloots
toddkloots
Offline Send Email
May 13, 2008
9:39 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help