I have a custom button with the following codes:
Client Before:
$("#saveButton1").click();
Server:
$record = $button->getCurrentRecord();
$result["id"] = $record["id"];
Client After:
var popup = Runner.displayPopup( {
url: "cert_view.php?page=view_final_cert&editid1=" +result["id"],
width: 1250,
height: 1300,
header: '<B>GRADUATION LEDGER</B>',
footer: '<a href="cert_edit.php?editid1=' +result["id"] + '" onclick="window.win.close();return false;">Close window</a>',
location: 'yes',
afterCreate: function(popup) {
window.popup = popup;
}
});
Only issue I have is when the button gets clicked, The window will popup then close immediately. I want it to stay until user close the popup window.
The main goal is to click the button, save the current edited page then open popup window with the new entered data in view mode then user close the window and go back to edit mode of the parent.