Pop-Up Dialog

 

m-Power developers can utilize a new feature in m-Painter, starting with the July 2010 version of m-Power, which allows your end-users to interact with a Pop-Up Dialog box. While there are numerous uses for this, the primary function of such a feature is to call a Maintenance application via a popup, write a Record to the Database, and close the popup window. As the developer, you have the option to redirect the original page if desired.

In our example, we are going to generate a Customer Listing Report. On this report will be a popup dialog box that will open a Maintenance application, passing along the Customer Number. This Maintenance application will then allow me to enter in Order Information. Once completed, I press Accept, which writes the record to the database, then the popup dialog will close.

First we need to create a Smartlink from our Report to our Maintenance application.

This can be accomplished from within the Application Menu –> SmartLinks

Next, compile your report and enter m-Painter. Find the field you wish to place your link on, click on it & Select the “Insert/Edit Link” option from the m-Painter toolbar.

Select your Smartlink link from the drop-down list, then click the “Target Tab”. In the Type/Target drop-down select the “<Popup Dialog>” option.

You may leave the Window Name option blank. Set the Width and Height to the size you want your popup window to display.

Note: If your window is too small, your end user will have access to scrollbars to adjust the window.

Lastly, you may choose to redirect the original page upon completion of your maintenance popup. If you wish to do this, enter in a Redirect URL. However, if you simply want your page to do nothing, leave this option blank.

Other Notes

  • The popup dialog can work with all templates; however the most common usage is to fire a maintenance application.
  • The popup dialog box is a modal window. This means that when the popup is called, no other interaction can occur between the user and the browser. In essence, the screen is blocked from user-input until the modal window is closed. This behavior is intentional.