PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Tip: optimize the size of your HTML files
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
ChangeTarget (Function)
In french: ChangeDestination
Changes the target of a button action.
By default, the target is defined in the "General" tab of the button run or current page
Caution: ChangeTarget can be directly used in the browser process corresponding to the server action of control:
  • browser click code for a button, a link or an image.
  • "Whenever modified" code for the radio buttons, check boxes, list boxes or combo boxes.
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-mentioned processes.
Example
// -- Browser click code of the button
// The target of the button defined in the description window (current frame)
ChangeTarget(CurrentBrowser)
 
// -- Server click code of the button
IF CheckUserName(EDT_UserName) = False THEN
// Refreshes the PAGE_Identification page
PageRefresh(PAGE_Identification)
ELSE
// Displays the home page
PageDisplay(PAGE_Welcome)
END
Syntax
ChangeTarget(<Target> [, <Window name> [, <Options> [, <Width> [, <Height> [, <Horizontal position> [, <Vertical position> [, <Javascript parameters>]]]]]]])
<Target>: Character string or constant
Name of target frame or alias of target iFrame control.
<Target> can also take the following values:
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).
CurrentFrameThe target is the current frame (default value)
This parameter can also correspond to the "_self" string (compatibility with WEBDEV 1.5).
CurrentBrowserThe target is the current browser.
This parameter can also correspond to the "_top" string (compatibility with WEBDEV 1.5).
<Window name>: : Optional character string
Name of the window of the new browser if <Target> is equal 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 contain no space character, no accented character and no special character.
<Options>: Optional Integer constant (or combination of constants)
Parameters of the new browser window if <Target> is equal to the NewBrowser constant (or to "_blank"):
ONLocationThe address bar will be displayed
ONScrollbarThe scrollbars will be displayed
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)
ONResizableThe window of new browser will be resizable
ONLinkThe link bar will be displayed
ONMenuBarThe menu bar will be displayed
ONSatusBarThe status bar will be displayed
ONToolbarThe toolbar will be displayed
ONSimpleThe window of the new browser will be a simple window (no combination of constants).
<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 top left corner of the screen.
<Vertical position>: Optional integer
Vertical position (in pixels) of the window in the new browser (in relation to the top left corner of the screen.
<Javascript parameters>: Optional character string
Other Javascript parameters to use when opening a new browser if <Target> is equal to the NewBrowser constant (or to "_blank").
Remarks

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.
Component : WDJS.DLL
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment