ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Web-specific functions / Page functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Displays a WEBDEV page as a popup in the current page with a DDW (Dim Disabled Windows) effect. This function is used to easily simulate a dialog box in browser code.
Remark: To display a Popup page, PopupDisplayPage can be used:
  • in the code of a Button control with the option "Run browser click code only". In this case, only the browser code of the Button control will be executed.
  • in a Button control with the option "Run server and browser codes" (that sends values to the server). AJAX must be enabled in the code of this Button control. In this case, the browser code and server codes of the control will be executed.
Example
// Displays PAGE_ProductDetails as popup
PopupDisplayPage(PAGE_ProductDetails, (nProductID), popupCenter)
WEBDEV - Browser code
// Displays PAGE_ProductDetails as popup
// Waits for the page to close and displays the returned value
PopupDisplayPage(PAGE_Details, (nProductID), PopupDisplay_Callback, BTN_CONTROL, popupPositionXY, 10, 10)

	INTERNAL PROCEDURE PopupDisplay_Callback(ReturnPopupPage)
		Trace("The popup returned: [%ReturnPopupPage%]")
	END
Syntax

Opening a Popup page at a specific position Hide the details

PopupDisplayPage(<Page> [, <Parameters> [, <Display options> [, <X> [, <Y>]]]])
<Page>: Page name
Name of page to display.
<Parameters>: List of values enclosed in brackets and separated by commas
Parameters of the page to be displayed. This list of parameters has the following format:
(<Parameter 1>, ..., <Parameter N>)
where:
  • <Parameter 1>: First parameter of the page.
  • ...
  • <Parameter N>: Nth parameter of the page.
Caution:
  • Parameters are passed by value.
  • In a browser code call, values are converted to strings when data is sent to the server. It is recommended to use only simple parameters (boolean, string, integer, etc.)..
<Display options>: Optional Integer constant
Popup display options:
popupBottomCenterThe Popup page appears at the bottom center of the visible part of the current page.
popupBottomLeftThe Popup page appears at the bottom left of the visible part of the current page.
popupBottomRightThe Popup page appears at the bottom right of the visible part of the current page.
popupCenter
(Default value)
The Popup page is centered in the visible part of the current page.
popupCenterLeftThe Popup page appears in the center and to the left of the visible part of the current page.
popupCenterRightThe Popup page appears in the center and to the right of the visible part of the current page.
popupDiscardableThe Popup page can be discarded: the popup can be closed by pressing ESC or by clicking outside the popup.
This constant can be combined with another popup position constant.
popupFixedThe Popup page is fixed at the specified position: the position of the Popup will not change if the page is scrolled or if the browser is resized.
This constant can be combined with another Popup position constant (excluding popupPositionXY and popupMouseXY).
popupMouseXYThe Popup page will be opened at the mouse position. This constant can only be used in a browser event (of a control or page). This constant cannot be used:
  • in browser procedures.
  • in the events directly or indirectly called from a browser procedure (via ExecuteProcess for example).
  • in the browser code of a Button or Link control.
WEBDEV - Server code This constant is not available.
popupPositionXYThe Popup page will be opened at the specified X and Y positions.
popupTopCenterThe Popup page appears at the top center of the visible part of the current page.
popupTopLeftThe Popup page appears at the top left of the visible part of the current page.
popupTopRightThe Popup page appears at the top right of the visible part of the current page.
<X>: Optional integer
If the constant popupPositionXY is used, indicates the X position of the Popup control (in relation to the upper-left corner of the page). This parameter is expressed in pixels.
<Y>: Optional integer
If the popupPositionXY constant is used, indicates the display Y position of the popup (in relation to the upper-left corner of the control). This parameter is expressed in pixels.
WEBDEV - Browser code

Positioning a Popup page relative to a control Hide the details

PopupDisplayPage(<Page> , <Parameters> [, <WLanguage procedure>] , <Base control> [, <Display options> [, <X> [, <Y>]]])
<Page>: Page name
Name of page to display.
<Parameters>: List of values enclosed in brackets and separated by commas
Parameters of the page to be displayed. This list of parameters has the following format:
(<Parameter 1>, ..., <Parameter N>)
where:
  • <Parameter 1>: First parameter of the page.
  • ...
  • <Parameter N>: Nth parameter of the page.
Caution:
  • Parameters are passed by value.
  • In a browser code call, values are converted to strings when data is sent to the server. It is recommended to use only simple parameters (boolean, string, integer, etc.)..
<WLanguage procedure>: Procedure name or optional lambda procedure
Name of the WLanguage procedure ("callback") called after the page is closed. For more details on this procedure, see Parameters of the procedure used by PopupDisplayPage.
This WLanguage procedure is a browser procedure and can be:
  • a name of a global procedure,
  • a name of an internal procedure,
  • a lambda procedure.
<Base control>: Control name
Name of the control relative to which the Popup page will be positioned.
<Display options>: Optional integer
Popup display options.
popupBottomCenterThe Popup page appears at the bottom center of the control.
popupBottomLeft
(Default value)
The Popup page appears at the bottom left of the control.
popupBottomRightThe Popup page appears at the bottom right of the control.
popupCenterThe Popup page is centered, relative to the base control.
popupCenterLeftThe Popup page is centered to the left, relative to the base control.
popupCenterRightThe Popup page is centered to the right, relative to the base control.
popupDiscardableThe Popup page can be discarded: the popup can be closed by pressing ESC or by clicking outside the popup.
This constant can be combined with another popup position constant.
popupPositionXYThe Popup page will be opened at the specified X and Y positions.
popupTopCenterThe Popup page is centered at the top, relative to the base control.
popupTopLeftThe Popup page appears at the top left, relative to the base control.
popupTopRightThe Popup page appears at the top right, relative to the base control.
<X>: Optional integer
If the popupPositionXY constant is used, indicates the display X position of the popup (in relation to the upper-left corner of the control). This parameter is expressed in pixels.
<Y>: Optional integer
If the popupPositionXY constant is used, indicates the display Y position of the popup (in relation to the upper-left corner of the control). This parameter is expressed in pixels.
Remarks
  • The displayed page is opened on the server.
  • The displayed page can be hidden using PopupClosePage.
  • Browsers do not refresh pages in the middle of JavaScript code: PopupDisplayPage and PopupClosePage must be used in different events/processes. If these functions are used in the same event/process, the page is not displayed.
  • It is not possible to open two popup pages at the same time using PopupDisplayPage.
  • The DDW feature can be disabled and customized in the code, using PageEnableDDW and PageRateDDW.
  • WEBDEV - Server code This function cannot be used in the scheduled tasks and in the delayed tasks. For more details, see Scheduled and delayed tasks.
  • The AJAX processes of the page displayed by PopupDisplayPage can update only the controls in this same page. To update the contents of the controls in the page that calls PopupDisplayPage, you can:
    1. create a browser procedure in the page that calls PopupDisplayPage. The procedure will take the new data as parameters, and will assign that data to the controls in the page.
    2. call this browser procedure in the processes of the page displayed by PopupDisplayPage passing the new values as parameters.
Component: wd300page.dll
Minimum version required
  • Version 26
Comments
Click [Add] to post a comment

Last update: 05/17/2024

Send a report | Local help