2 Replies Latest reply on Mar 16, 2015 5:17 AM by Clark2015

    Initialize multiple popups

    Clark2015

      I am trying to put two popups in a custom dialog. I am having trouble though because I can't figure out how to initialize the two different arrays that hold the choices for the two popups. When I use this code it, the first popup shows sub1 for the choices but popup2 doesn't show any choices. Any direction on how to fix this would be very helpful!

       

           initialize: function(dialog)

           {

                dialog.load(

                {

                "sub1":

                {

                     "example1": -1,

                     "example2": -2,

                     "example3": -3,

                     "example4": -4

                }

                },

                {

                "sub2":

                {

                     "example5": -1,

                     "example6": -2,

                     "example7": -3,

                     "example8": -4

                }

                });

           },

       

      //In the description where I create the popups

                          {

                               type: "cluster",

                               name: "Popup1",

                               elements:

                               [

                                    {

                                         type: "static_text",

                                         name: "Make a choice",

                                         font: "default"

                                    },

                                    {

                                         type: "popup",

                                         item_id: "sub1",

                                         width: 200

                                    }

                               ]

                          },

                          {

                               type: "cluster",

                               name: "Popup2",

                               elements:

                               [

                                    {

                                         type: "static_text",

                                         name: "Make a choice",

                                         font: "default"

                                    },

                                    {

                                         type: "popup",

                                         item_id: "sub2",

                                         width: 200

                                    }

                               ]

                          }

        • 1. Re: Initialize multiple popups
          George_Johnson MVP & Adobe Community Professional

          Try this:

           

               initialize: function(dialog)

               {

                    dialog.load(

                    {

                    "sub1":

                    {

                         "example1": -1,

                         "example2": -2,

                         "example3": -3,

                         "example4": -4

                    },

                    "sub2":

                    {

                         "example5": -1,

                         "example6": -2,

                         "example7": -3,

                         "example8": -4

                    }

                    });

               }

          • 2. Re: Initialize multiple popups
            Clark2015 Level 1

            That worked, thanks for the help!