Discussion

modal dialog - javascript

Hi,

Does anyone know exactly how to open a modal dialog box using javascript to display a local action?

Currently I have a button that opens up a modal dialog but I want to be able to put in conditions to when the modal dialog should be displayed so I need to use javascript. I looked at the source and the button uses a data-click attribute to define the behavior of the button...

<button type='button' class='pzhc' data-ctl data-click='[["processAction", ["ProductConfiguration","true",":event","","Rule-HTML-Section"]]]' >

Thanks.

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

June 5, 2012 - 5:56pm

You can use reportWizardUrl control or create your own as per your need.

June 6, 2012 - 2:15am

You can call a script on click of the button by configuring the Action in pxButton using the option Advanced --> Run Script. Once you select this option, you have to give the Function name and the parameters to the function if any. The following is an example of how to call a local action in the script where testFA is your flow action/local action.

eg:
function test(){
pega.u.d.performFlowAction("testFA","OK","","pyModalTemplate");
}

July 18, 2016 - 5:53pm

Hi mate,

I am trying to make a custom button. Do you know anything about this data-click attribute? How to call the event onclick of this button from somewhere else as we are not defining anything like onclick but we have defined data-click?

Thanks,

Shikhar