You can use the Runner.displayPopup() function to display any page in a popup window
The Runner.displayPopup() function has only one mandatory parameter: the URL of the page to be displayed or HTML code. It is also recommended to set width and height of the popup window explicitly.
the URL of the page to be displayed. This is a mandatory parameter.
instead of specifying the URL, you can supply an HTML code to be displayed in a popup window.
to be displayed in a popup header section.
to be displayed in a popup footer section.
the function to be called after the popup window is created.
the function to be called before the popup window is closed.
Return false to prevent popup from being closed. Return true to proceed with closing.
the popup width in pixels.
the popup height in pixels.
Here is how you can display the Add page of the Products table in a popup:
A popup window with its height and width defined:
Using HTML instead of URL:
Using the afterCreate() function:
Add a 'Close window' link to the footer:
Using the beforeClose() function:
In this function, you can return false to prevent the window from being closed.
Do not allow closing the window if the 'Product Name' field is empty:
Show a 'View customer' button on each row of the Orders List page.
Insert a button into the Orders List page grid.
Show the Add page in a popup, close popup on clicking 'Save', and then refresh the List page.
There is an added button to the List page that displays the Add page in a popup. Once the record is saved, we close the popup and refresh the List page to show the new record.
The ClientBefore code of the button:
If you need to close the popup without refreshing the page, comment the line: