Quantcast
Channel: Adobe Community : Popular Discussions - JavaScript
Viewing all articles
Browse latest Browse all 12130

msgBox implementation needs help

$
0
0

I am trying to implement a generic message box that I can pass to execDialog.

However, I am getting a syntax error when I attempt to put in static text for the message portion.

Also, if I create a new Msgbox, how do I override the name and msg values....like this ????

 

var newbox = new (Msgbox)

newbox.name = "new title";

newbox.msg = "this is the mesage:

 

 

var Msgbox = {

  result: "cancel",

  DoDialog: function() {

    return app.execDialog(this);

  },

  initialize: function(dialog) {

    var dlgInit = {};

    dialog.load(dlgInit);

  },

  commit: function(dialog) {

    var oRslt = dialog.store();

  },

  "But1": function(dialog) {

    var answer = false;

    dialog.end()

  },

  description: {

    name: "This is the Title Line",

    elements: [{

      type: "view",

      elements: [{

        type: "view"},

        {item_id: "msg",

         name: "text message goes here",

         type: "static_text"},

        align_children: "align_row",

        elements: [{

          type: "ok",

          ok_name: "ok",

        }, {

          type: "button",

          item_id: "But1",

          name: "Cancel",

        }, ]

      }, ]

    }, ]

  }

};


Viewing all articles
Browse latest Browse all 12130

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>