get()

Returns the location description of the application window.

Syntax

get() RETURNS gwa.location.TGWALocation

Returns a TGWALocation record.

Usage

The get() method is a wrapper for the JavaScript API window.location.get object. For more information about the JavaScript API, refer to Location (external link). Use get() to return the location description of the application window.

For a complete example, run the GWA "update" demo in your GWA installation directory. If installed in FGLDIR, you will find the demo in $FGLDIR/demo/gwa/update or if installed in a separate directory, you will find it in gwa-install-dir/demo/gwa/update.

IMPORT util
IMPORT FGL gwa.location 

MAIN
  CALL fgl_settitle("App location")
  MENU "Main menu"
    COMMAND "Exit"
      EXIT MENU
    COMMAND "Get app location"
      VAR ret=gwa.location.get()
      MESSAGE "location:",util.JSON.stringify(ret)
    COMMAND "Get my page"
      VAR location=gwa.location.get()
      MESSAGE "href:",location.href
    COMMAND "Get my host"
      VAR location=gwa.location.get()
      MESSAGE "host:",location.host
  END MENU
END MAIN