Loading ...
Sorry, an error occurred while loading the content.

Re: [ydn-javascript] Add content dynamically to SimpleDialog

Expand Messages
  • Satyam
    Simple Dialog inherits from Panel the methods setBody and appendToBody. Actually, in the API documentation for SimpleDialog, there are more methods and
    Message 1 of 2 , Mar 1, 2008
    • 0 Attachment
      Simple Dialog inherits from Panel the methods setBody and appendToBody.
      Actually, in the API documentation for SimpleDialog, there are more methods
      and properties inherited from all the chain of objects it comes from than
      its own. They are not listed in the index, though, you have to check at the
      end of each section.

      Satyam

      ----- Original Message -----
      From: "mathew.rowley" <mathew.rowley@...>
      To: <ydn-javascript@yahoogroups.com>
      Sent: Saturday, March 01, 2008 2:22 AM
      Subject: [ydn-javascript] Add content dynamically to SimpleDialog


      > Is there a cleaner way to dynamically add content to a SimpleDialog
      > than this?
      >
      > var dialog = new YAHOO.widget.SimpleDialog("dialog",{
      > width: "300px",
      > ...
      > fixedcenter: true,
      > visible: false});
      >
      > var buttonCont = document.createElement("div");
      > var addButton = new YAHOO.widget.Button({
      > container: buttonCont,
      > id:"buttonAddEdit" });
      > var dialog = YAHOO.util.Dom.get("dialog"); // where dialog is the id
      > of the SimpleDialog
      > var body = YAHOO.util.Dom.getChildren(dialog)[1];
      > body.appendChild(buttonCont);
      >
      >
      > What I am trying to do is have a text box wiht a button next to it,
      > when you click the button, it will clone its contining div, and append
      > it to the dialog box...
      >
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      >
      >
      >
      > --
      > No virus found in this incoming message.
      > Checked by AVG Free Edition.
      > Version: 7.5.516 / Virus Database: 269.21.2/1305 - Release Date:
      > 29/02/2008 18:32
      >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.