This topic is locked

How to save edit page and reload page then open a window popup from a button?

6/2/2021 3:04:59 AM
PHPRunner General questions
P
phppinoy author

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.

admin 6/2/2021

I don't know if this is possible or not in your scenario but you can experiment with Edit page settings on 'Choose pages' screen i.e. choose what to do after record is saved.