0

how to add a custom button when the user clicks a button and a pop up pops up.in that pop up i want to add a custom button. Struts2 jquery grid is the name of the plugin i am using.And i want to ad this custom button in the same plugin. thanks in advance :)

1 Answers1

0

If you are talking about the dialog plugin, you can pop it up by publishing the topic which it is listening to.

<sj:dialog 
            id="itemDialog" 
            openTopics="openDialog" 
            closeTopics="closeDialog"
            autoOpen="false"
            modal="true" 
            resizable="false"
            position="['center',150]"
            title="My Dialog"
            buttons="{
                    'OK':function() { dosomething();$.publish('closeDialog'); },
                    'Cancel':function() { $.publish('closeDialog'); }
                    }"      

        >
            Please confirm

        </sj:dialog>

In this example, publish openDialog so the dialog would pop up.

Quincy
  • 4,393
  • 3
  • 26
  • 40