PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Which page should be displayed?
  • Where should the page be displayed?
  • Choosing a target
  • Current browser (_top)
  • Current frame (_self)
  • Parent frame (_parent)
  • New browser (_blank)
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
24. Displaying and sequencing pages
Previous pageTable of contentsNext page
In most cases, a site includes a set of pages. These pages are linked together via buttons (or links). Clicking a button displays a new page.
Two points must be considered before displaying a page:
  1. which page should be displayed?
  2. where should the page be displayed (new browser, frame, etc.)?
Which page should be displayed?
The page to display can be defined:
  • in the page editor (no programming is required).
  • in the code editor, in an event of the Button control (or Link or Image (with clickable areas), etc.).
Selecting the page to display in the page editor (most common method)
To define the page to display:
  • Open the control description window (right click, "Description").
  • In the type of action, select "Display a site page".
  • Select the page to display.

Selecting the page to display through programming
The page to display must be selected through programming when:
  • several pages can be displayed (e.g., an error page if the password is not entered or the next page of the site).
  • a specific action must be performed on the server (calculation, read a record, etc.).
Where should the page be displayed?
A page is displayed in a specific "target": current page, new browser tab, etc.
The target can be defined:
  • in the page editor: no programming is required.
  • in the code editor, in an event of the Button (or Link) control.
Several WLanguage functions allow you to open a new page (or frameset). The main functions are:
Selecting the target in the page editor (most common method)
In a Button control, to define the target of the page to display:
  • Open the description of the Button or Link control (right click, "Description").
  • In the list of targets, select a preset target or a frame (in the case of a frameset).

Selecting the target in the code editor
When the target depends on a choice made by the user, this target must be defined through programming. For example, if the user does not enter their password, an error page will appear in a new browser tab; otherwise, the next page will appear in the current browser.
ChangeTarget is used to change the target of an action through programming. This function must be used in browser code.
Choosing a target
When choosing the target for a Button, Link , Image (with clickable areas) control, or a menu option, ... you can select:
  • a preset target: four preset targets are available:
    • Current browser (_top)
    • Current frame (_self)
    • Parent frame (_parent)
    • New browser (_blank). In this case, the new browser can be a new browser tab or a new browser with specific characteristics (menu bar, status bar, etc.).
  • a frame in the current frameset.
Remark: in the diagrams below, the grayed area represents the area where the page is displayed when the Button control is clicked on.

Current browser (_top)

Current frame (_self)

Parent frame (_parent)

New browser (_blank)

Previous pageTable of contentsNext page
Comments
Click [Add] to post a comment