getHistoryUrl (XSPContext - JavaScript™)
Gets a URL from the navigation history of the current page.
Defined in
XSPContext (JavaScript)Syntax
getHistoryUrl(level : int) : string| Parameters | Description |
|---|---|
level |
The level of the page in the navigation history, where 0 is the current page and 1 or -1 is the previous page. |
| Return value | Description |
|---|---|
string |
The URL of the page, or null if the page does not exist. |
Usage
The navigation history represents the pages accessed by the user starting with the current page.The history
maintains two levels by default. You can change the level by specifying xsp.persistence.maxurls in xsp.properties in
the properties directory of your Notes® data directory.
A page URL takes
the form:
\nameOfPage.xspExamples
This computed field displays the URLs of the current and previously opened pages:var n = 0;
var d = "";
var h = context.getHistoryUrl(n);
do {
d += h + "\n";
h = context.getHistoryUrl(++n);
} while(h != null)
return d