PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

New WEBDEV 23 feature!
  • Operating mode
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
BrowserHistoryAdd (Function)
In French: NavigateurHistoriqueAjoute
Adds an entry into the history of navigation by associating data. This data will be transmitted when going back to this entry.
Example
// Goes to the next application plane
CELL_Main..Plane++
// Adds an history entry.
// The transmitted data is the plane number
BrowserHistoryAdd(CELL_Main..Plane, MyPage..Title, "#Plane" + CELL_Main..Plane)
Syntax
BrowserHistoryAdd(<Data> [, <Title> [, <URL>]])
<Data>: Type of data
Status associated with the page for the new history entry.
<Title>: Optional character string (with quotes)
New title for the page.
Caution: this title is currently ignored by most browsers.
<URL>: Optional character string (with quotes)
New URL that will be displayed by the browser. This URL is used for the display in the address bar only. Therefore, there is no need to use a valid URL. However, if the user copies this URL in order to use it in another browser, the page load will fail if the URL is not valid.
Remarks

Operating mode

The added data describes the status associated with the page for the new history entry.
If the Web user goes back into the history and if he returns on an entry stored in the history, the stored data will be transmitted to the "Move in the navigation history" process (optional page process). This process must process the data in order to restore the page status. This process must be associated with a procedure that expects the transmitted data in parameter:
// "Move in the navigation history (onpopstate)" process
PROCEDURE <ProcedureName>(<Data>)
Example: This example adds the page into the history and stores the insertion time. Going back to the previous history page displays the time.
x is Variant
x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#before")

x.Time = TimeSys()
BrowserHistoryAdd(x, MyPage..Title, "#after")
// "Move in the navigation history (onpopstate)" process
PROCEDURE ProcessHistory(stStatus)
Info(stStatus.Time)
Note: Depending on the browsers, the "Move in the navigation history (onpopstate)" process is also run when loading the page and when going back to the initial page display. In this case, the <Data> parameter transmitted to the process corresponds to Null.
Components
WEBDEV - Browser code WDJS.DLL
Minimum required version
  • Version 23
Comments
Click [Add] to post a comment