version 11.2
WA Create URL history menu ({*; }object{; direction}) MenuRef
Parameter | Type | Description | |
* | * | If specified, object is an object name (string) | |
If omitted, object is a variable | |||
object | Form object | Object name (if * is specified) or | |
Variable (if * is omitted) | |||
direction | Integer | 0 or omitted=List of previous URLs, | |
1=List of next URLs | |||
Function result | MenuRef | Menu reference |
Description
The WA Create URL history menu command creates and fills a menu that can be used directly for navigation among the URLs visited during the session in the Web area designated by the * and object parameters. It can be used to build a custom navigation interface.
The information provided concerns the session; in other words, the navigation carried out in the same Web area as long as the form has not been closed.
Pass a value indicating the list to recover in direction. You can use one of the following constants, found in the "Web Area" theme:
Constant | Type | Value |
wa previous URLs | Longint | 0 |
wa next URLs | Longint | 1 |
If you omit the direction parameter, the value 0 is used.
Once the menu has been generated, you can display it via the 4D Dynamic pop up menu command and you can work with it using the standard 4D menu management commands. The ItemRef reference (string type) returned by the Dynamic pop up menu command contains the URL of the page visited (see example).
Call the RELEASE MENU command to delete a URL history menu when it is no longer useful.
Example
The following code can be associated with a 3D button having a pop-up menu entitled "Previous":
Case of `Single click : (Form event=On clicked) WA OPEN BACK URL (WA_area) `Click on arrow -> display of pop up : (Form event=On Arrow Click) `Create a previous history menu $Menu:=WA Create URL history menu (WA_area;wa previous URLs) `Display this menu in a pop-up $URL:=Dynamic pop up menu ($Menu) `If an item is selected If ($URL#"") `Open Web page WA OPEN URL(WA_area;$URL) End if `Delete menu to free up memory RELEASE MENU($Menu) End case
See Also
Dynamic pop up menu, RELEASE MENU, WA GET URL HISTORY.