Script

[This is preliminary documentation and subject to change.] 

To execute a script residing in an asset, use the reserved trigger, Script.

A Script trigger runs the specified JScript statements on the broadcast client. They are formatted as shown:

trigger (4 "<protocol> script") ;

Where

4
is the key denoting that the trigger is Script.
protocol
is an optional parameter which specifies the scripting language to use. The default is Microsoft JScript. No other scripting languages are supported in the current version of Broadcast Architecture.
script
specifies the script to run on the client.

Remarks

When the Enhancement control receives a Script trigger, it runs the specified script as if it were embedded in the enhancement page. Using this trigger, you can greatly expand the functionality of the enhancement.

Examples

The following is an example of an Script trigger that prints an alert box to the user.


00:05:32.20	trigger (4 "<JScript> alert(\'You received a Script trigger!\')") ;