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

26543Add content dynamically to SimpleDialog

Expand Messages
  • mathew.rowley
    Feb 29, 2008
    • 0 Attachment
      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];

      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...
    • Show all 2 messages in this topic