|
|
|
|
|
- Multilingual
- Displaying a page other than the first page of the site
- Security: How to select the page to display
- Choosing the target
- Caution
- How to pass parameters from an Active WEBDEV Page to a dynamic (Session mode) WEBDEV page?
DynamicSiteDisplay (Function) Starts a dynamic WEBDEV website from a static page or from a dynamic WEBDEV page. The dynamic site to start must be on the same Web server as the current site. // Displays a dynamic site in the current frame DynamicSiteDisplay("MYSITE")
// Displays a site in a new resizable browser (500x400) // The browser can be closed only if the calling browser is closed sSiteName is string = "MYSITE" DynamicSiteDisplay(sSiteName, "", "", NewBrowser, ... "NEWBRW", ONDimension + ONScrollBar, 500, 400, 0, 0, "dependent=1")
Sintaxis
DynamicSiteDisplay(<Site> [, <Page> [, <HTTP Parameters> [, <Destination> [, <Name of the window> [, <Options> [, <Width> [, <Height> [, <Horizontal position> [, <Vertical position> [, <JavaScript parameters>]]]]]]]]]])
<Site>: Character string Name of the WEBDEV site to display. <Page>: Optional character string Name of page to display. If this parameter is not specified or is an empty string (""), the first page of the site will be displayed. <HTTP Parameters>: Optional character string Parameter that must be passed to the dynamic WEBDEV website. These parameters can be retrieved by PageParameter. The list of parameters must have the following format:
<Name parameter1>=<value parameter1> [&<Name parameter2>=<value parameter2> [...]>] For example: "param1=1¶m2=text". This parameter can correspond to an empty string ("") if no parameter must be passed to the site. <Destination>: Optional character string or constant Name of target frame. <Destination> can also take the following values: | | CurrentBrowser | The target is the current browser. This parameter can also correspond to the "_top" string (compatibility with WEBDEV 1.5). | CurrentFrame | The target is the current frame (default value). This parameter can also correspond to the "_self" string (compatibility with WEBDEV 1.5). | NewBrowser | The target is a new browser (a new browser window is opened). The following parameters of DynamicSiteDisplay are used to configure this new window. This parameter can also correspond to the "_blank" string (compatibility with WEBDEV 1.5). | ParentFrame | The target is the container of the current page (parent frameset, parent browser). This parameter can also correspond to the "_parent" string (compatibility with WEBDEV 1.5). |
<Name of the window>: Optional character string Window name in the new browser if <Target> is set to the NewBrowser constant. This parameter allows you to redisplay a page in a browser with the same name (if several browsers are opened on the computer of Web user). <Options>: Optional Integer constant (or combination of constants) Parameters of the new browser window if <Target> is set to the NewBrowser constant: | | ONFull (Default value) | The window of the new browser will include all the options (equivalent to the combination of all constants). | ONLink | The link bar will be displayed. | ONLocation | The address bar will be displayed. | ONMenuBar | The menu bar will be displayed. | ONResizable | The window of the new browser will be resizable. | ONSatusBar | The status bar will be displayed. | ONScrollbar | The scrollbars will be displayed. | ONSimple | The window of the new browser will be a simple window (no combination of constants). | ONToolbar | The toolbar will be displayed. |
<Width>: Optional integer Width of window in the new browser (in pixels). <Height>: Optional integer Height of window in the new browser (in pixels). <Horizontal position>: Optional integer Horizontal position (in pixels) of the window in the new browser (in relation to the upper-left corner of the screen). <Vertical position>: Optional integer Vertical position (in pixels) of the window in the new browser (in relation to the upper-left corner of the screen). <JavaScript parameters>: Optional character string Other JavaScript parameters to use when opening a new browser if <Target> is set to the NewBrowser constant. For example, "dependent = 1" is used to force the closing of the new browser if the current browser is closed. Observaciones Multilingual DynamicSiteDisplay automatically sends the language of the current page to the WEBDEV website to be displayed. Therefore, if the current page is in French (Nation(5)), the WEBDEV website will be started in French. Displaying a page other than the first page of the site The <Page> parameter can correspond to any page of the site. For this page, the option "Accesible mediante la función DynamicSiteDisplay" must be checked in the "General" tab of the page description.
Security: How to select the page to display To choose the page of the dynamic site to display, we recommend that you use a custom mechanism for page identification. For security reasons, it is not recommended to pass the name of the page to be displayed as parameter to DynamicSiteDisplay. Use a numeric identifier instead. Example: In the browser click code of a page: DynamicSiteDisplay("Site", "", "Param=1")
In the initialization code of "Site":
PageNumber is int = PageParameter("Param")
SWITCH PageNumber
CASE 1: PageDisplay(PageAAfficher)
END
Choosing the target To choose the target of the file, we recommend that you use the <Target> parameter of DynamicSiteDisplay rather than ChangeTarget. Indeed, in this case, the corresponding JavaScript code is smaller and the size of your pages is optimized. Caution Even though DynamicSiteDisplay is a function used in browser code, its call triggers a return to the server. Therefore, this function should not be used from a "Submit" button with a server code. How to pass parameters from an Active WEBDEV Page to a dynamic (Session mode) WEBDEV page? The "Accesible mediante la función DynamicSiteDisplay" option must be enabled for the dynamic page (Session mode) in the "General" tab of the page description. Another Active WEBDEV Page has a Button control for which the option "During the action" is set to "Don't send anything to the server". Example of code for this button: sParameters is string sParameters = "P1=" + STC_P1 + "&P2=" + STC_P2 + "&P3=" + STC_P3 DynamicSiteDisplay("MYSITE", "MYPAGE", sParameters, NewBrowser)
Example for retrieving these parameters in the declaration code of global variables of dynamic page: nParam1 is int = PageParameter("P1") bParam2 is boolean = PageParameter("P2") sParam2 is string = PageParameter("P3")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|