Command Set: browser

Syntax

browser{.error|.eval|.get|.name|.param|.set|.show|.status|.version}

Description

Performs various functions in the browser in which Fire is running.

This command is only available when Fire is deployed within a web browser, see deployment.

Parameters

Switches

None

Notes

browser is not a command, but in fact a global structure identifier created by Fire at startup. The above properties and methods are members and functions of ~global.browser.

When any of these functions are executed, Fire waits for a response from the browser before continuing. For this reason do not invoke any Javascript functions which require action by Fire because the action will not be executed and Fire will time out awaiting response from the original function call.

Examples

Displays a page, in this case, in a new browser window.

browser.show("http://www.xmarc.com","_blank")

Retrieves the URL of the current page.

string url=browser.eval("window.location.href")

Opens a new browser window.

browser.eval('window.open ("http://www.xmarc.com","myWin","")')

Displays a string in the browser’s status bar.

browser.status("Status in browser’s status bar")

Retrieves the browser’s name and version.

string name=browser.name()
string version=browser.version()

Sets the value of a named system property, in this case realm, as a space-separated combination of user name and password.

string user="edgar"
string pwd="hsy78ns"
browser.set("realm",user & pwd)

Gets the value of a named system property, in this case realm.

string auth=browser.get("realm")

Gets the value of an applet parameter, in this case APPSESSION.

string sess=browser.param("APPSESSION")

See Also

Functions:

url_decode, url_encode

Identifiers:

deployment