BrowserScriptExecute (Magic xpa 3.x)

« Go Back


Created ByKnowledge Migration User
Approval Process StatusPublished

BrowserScriptExecute (Magic xpa 3.x)

Executes a script command for the Browser control (JavaScript, VBScript).

This is useful for manipulating the control, such as setting values for the control's parameters or activating specific scripts for the control.

The function is only active for controls in the same task's form.


BrowserScriptExecute(control name, value, sync, language)


control name: The name of the Browser control.

value: The script command to execute. The attribute is Alpha, Unicode, or BLOB (with ANSI/Unicode content).

sync: Determines whether the engine will wait until the command is executed.

language: The language to use for running the script. This optional parameter is for use when executing scripts in a language other than JScript. (Since version: 1.8)


TRUE – If the command was sent.

FALSE – If the action failed, that is, if there is an internal error, such as a non-existing control or the error returns from the control.


  • When you use this function, you need to make sure that the page was fully loaded into the browser.

  • The Windows MSHTML assembly must be loaded in the Component Resource Repository (CRR) for this function to work. (Since version: 2.2)

  • This is a client-side only function.

Platform specific:

For Windows 10 Mobile devices, for the Browser control to support JavaScript, you need to add the requested URL to the package.appmanifest file.

See also:

BrowserGetContent, BrowserSetContent

The Rich Client Samples project (program RRC07 )