Hi everyone,
I’m using PHPMaker (version 2025). In my Row_Inserted event, I want to open another page in a modal dialog immediately after inserting a record. This is my current code:
public function Row_Inserted(?array $oldRow, array $newRow): void
{
if ($newRow["oggetto"] == 118) {
// URL of the page to open
$url = "tblraprischioadd?showmaster=tbl_rap_generale&fk_id_rapporti=" . urlencode($newRow["id_rapporti"]);
// Redirect to the page
$this->terminate($url);
}
}
Right now, $this->terminate($url); just opens the page normally (a full redirect), but I need it to open in a modal dialog. In older versions, using something like
$this->terminate("javascript:ew.modalDialogShow(...);");
used to work, but in the newer versions, it no longer executes the JavaScript.
Question:
How can I modify my code so that, after the record is inserted, PHPMaker will open tblraprischioadd inside a modal dialog instead of doing a full page redirect?
Thank you!