gwa.location.get()
Returns the location description of the application window.
Syntax
FUNCTION get() RETURNS gwa.location.TGWALocation
Returns a gwa.location.TGWALocation
record.
Usage
The gwa.location.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 gwa.location.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/update or if installed in a separate directory, you will find it in gwa-install-dir/demo/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