This topic is locked
[SOLVED]

Cancel Button via Runner.displayPopup()

6/9/2021 6:47:28 PM
PHPRunner General questions
J
jaffleck author

When I open an edit page using a custom button via Runner.displayPopup(), the Cancel button is not displayed. Is there a way to make this happen? If not, how could I replicate the cancel function in a custom button? The proposed Close link in the footer closes all popup windows and returns to the landing page, which is not what I intend.

PHPRunner 10.5 (64bit) Build #37251

A
AlphaBase 6/10/2021

I had the same problem. I fixed it as follows:

The button that calls the popup has the following code:

Client Before event:

var popup = Runner.displayPopup(
{
url: "CV_Objects_Move_list.php",
width: 825,
height: 600,
header: 'Move a Project Object Row or Branch',

afterCreate: function(popup) {
window.popup = popup;
}
}
);

var footer = popup.footer();
footer.html("<button type='button' onclick='popup.close();return false;'>Close</button>");

return false;

img alt

J
jaffleck author 6/10/2021

Many thanks! Works like a charm!