AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones específicas de la Web / Funciones de páginas
  • Tip: optimize the size of your HTML files
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Changes the target of a button action.
By default, the target is defined in the "General" tab of the button run or current page
Warning: The ChangeTarget function can only be used directly in browser processing, which corresponds to the server action in the field:
  • browser click code for a Button, Link or Image control.
  • "Whenever modifying" code for Radio Button, Check Box, List Box or Combo Box controls.
ChangeTarget has no effect in the other browser processes or in a local browser procedure, even if this procedure is called by one of the above processes.
Ejemplo
// -- Browser click code of the Button control
// The target of the button defined in the description window (current frame)
ChangeTarget(CurrentBrowser)

// -- Server click code of the Button control
IF CheckUserName(EDT_UserName) = False THEN
	// Refreshes the PAGE_Identification page
	PageRefresh(PAGE_Identification)
ELSE
	// Displays the home page
	PageDisplay(PAGE_Welcome)
END
Sintaxis
ChangeTarget(<Target> [, <Name of the window> [, <Options> [, <Width> [, <Height> [, <Horizontal position> [, <Vertical position> [, <JavaScript parameters>]]]]]]])
<Target>: Character string or constant
Name of the target frame or alias of the target iFrame control.
<Target> can also take the following values:
CurrentBrowserThe target is the current browser.
This parameter can also correspond to the "_top" string (compatibility with WEBDEV 1.5).
CurrentFrameThe target is the current frame (default value)
This parameter can also correspond to the "_self" string (compatibility with WEBDEV 1.5).
NewBrowserThe target is a new browser (a new browser window is opened). The following parameters of ChangeTarget are used to configure the browser window.
This parameter can also correspond to the "_blank" string (compatibility with WEBDEV 1.5).
ParentFrameThe 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
Name of the new browser window if <Target> is set to the NewBrowser constant (or to "_blank"). This parameter allows you to redisplay a page in a browser with the same name (if several browsers are opened on the computer of the Web user). This name is a unique name (equivalent to the name of a JavaScript variable).
Caution: This name must not contain spaces, accented characters or special characters.
<Options>: Optional Integer constant (or combination of constants)
Parameters of the new browser window if <Target> is set to the NewBrowser constant (or to "_blank"):
ONFull
(Default value)
The window of the new browser will include an address bar and scrollbars (equivalent to the combination of all the previous constants)
ONLinkThe link bar will be displayed
ONLocationThe address bar will be displayed
ONMenuBarThe menu bar will be displayed
ONResizableThe new browser window will be resizable
ONSatusBarThe status bar will be displayed
ONScrollbarThe scrollbars will be displayed
ONSimpleThe window of the new browser will be a simple window (no combination of constants).
ONToolbarThe 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 (or to "_blank").
Observaciones

Tip: optimize the size of your HTML files

For PageDisplay, SemiDynamicPageDisplay, DynamicSiteDisplay and FileDisplay, we recommend that you change the target in these functions directly. Indeed, the corresponding JavaScript code included in the HTML files is smaller.
Componente: WDJS.DLL
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local