# ExecuteJavascript Method The ExecuteJavascript method causes the computer to execute a javascript file. Syntax
    Computer.ExecuteJavascript(file, needRetval)
Parameters
file | String that specifies the JavaScript file.
needRetval | Boolean value that specifies whether to receive the return value.
Return Value None. Remarks Use the OnJavascriptReturnValue event to receive the return value. Examples The following example causes the first computer to execute a javascript file and to send its return value.
    <SCRIPT TYPE="text/javascript">
    window.external.InitScriptInterface();
    function OnJSReturnValue(value, scriptID)
    {
       alert("Script: " + scriptID + ", return value: " + value);
    }
    SiteCafe.Server.Computers.OnJavascriptReturnValue = OnJSReturnValue;
    computer = SiteCafe.Server.Computers.GetComputerByIndex(1);
    computer.ExecuteJavascript("c:/example.js", true);
    </SCRIPT>
Applies to SiteKiosk v6.2 (and later versions). Back to top