|
|
|
|
|
<Page>.DisplayPopup (Function) In french: <Page>.AffichePopup 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, <Page>.DisplayPopup 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.
// Displays PAGE_ProductDetails as popup PAGE_ProductDetails.DisplayPopup(nProductID), popupCenter) Syntax
Opening a Popup page at a specific position Hide the details
<Page>.DisplayPopup([<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: | | popupBottomCenter | The Popup page appears at the bottom center of the visible part of the current page. | popupBottomLeft | The Popup page appears at the bottom left of the visible part of the current page. | popupBottomRight | The 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. | popupCenterLeft | The Popup page appears in the center and to the left of the visible part of the current page. | popupCenterRight | The Popup page appears in the center and to the right of the visible part of the current page. | popupDiscardable | The 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. | popupFixed | The 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). | popupMouseXY | The 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.
| popupPositionXY | The Popup page will be opened at the specified X and Y positions. | popupTopCenter | The Popup page appears at the top center of the visible part of the current page. | popupTopLeft | The Popup page appears at the top left of the visible part of the current page. | popupTopRight | The 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. Remarks - The displayed page is opened on the server.
- The displayed page can be hidden using <Page>.ClosePopup.
- Browsers do not refresh pages in the middle of JavaScript code: <Page>.DisplayPopup and <Page>.ClosePopup 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 <Page>.DisplayPopup.
- The DDW feature can be disabled and customized in the code, using PageEnableDDW and PageRateDDW.
- 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 <Page>.DisplayPopup can update only the controls in this same page. To update the contents of the controls in the page that calls <Page>.DisplayPopup, you can:
- create a browser procedure in the page that calls <Page>.DisplayPopup. The procedure will take the new data as parameters, and will assign that data to the controls in the page.
- call this browser procedure in the processes of the page displayed by <Page>.DisplayPopup passing the new values as parameters.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|