4D v16.3

WA Create URL history menu

Home

 
4D v16.3
WA Create URL history menu

WA Create URL history menu 


 

WA Create URL history menu ( {* ;} object {; direction} ) -> Function result 
Parameter Type   Description
Operator in If specified, object is an object name (string) If omitted, object is a variable
object  Form object in Object name (if * is specified) or Variable (if * is omitted)
direction  Longint in 0 or omitted=List of previous URLs, 1=List of next URLs
Function result  MenuRef in Menu reference

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 next URLs Longint 1
WA previous URLs Longint 0

If you omit the direction parameter, the value 0 is used.

Once the menu has been generated, you can display it using the 4D Dynamic pop up menu command and you can work with it using the standard 4D menu management commands. The string returned by this 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 Alternative 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

 
PROPERTIES 

Product: 4D
Theme: Web Area
Number: 1049

 
HISTORY 

Created: 4D v11 SQL Release 2

 
ARTICLE USAGE

4D Language Reference ( 4D v16)
4D Language Reference ( 4D v16.1)
4D Language Reference ( 4D v16.2)
4D Language Reference ( 4D v16.3)