Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2   11.3   11.4    Statistic    FMM    Blog  

JavaScript.New

Creates a new javascript context.

Component Version macOS Windows Linux Server iOS SDK
JavaScriptMac 5.4 ✅ Yes ❌ No ❌ No ✅ Yes, on macOS ✅ Yes
MBS( "JavaScript.New" )

Parameters

none

Result

Returns reference number or error.

Description

Creates a new javascript context.

Reference numbers start at 47000.
Works in FileMaker 32-bit and 64-bit.

Supported for iOS with MBS Plugin 7.5.

Check JS Functions for JavaScript engine cross platform.

Examples

Initialize:

Set Variable [ $r; Value:MBS("JavaScript.New") ]
If [ MBS("IsError") ]
    Show Custom Dialog [ Title: "Failed to initialize"; Message: $r; Default Button: “OK” ]
Else
    Set Variable [ $$Context; Value:$r ]
    Show Custom Dialog [ Message: "OK"; Default Button: “OK” ]
End If

See also

Example Databases

Created 5th November 2015, last changed 1st July 2021


JavaScript.HasProperty - JavaScript.RegisterEvaluateFunction

Feedback: Report problem or ask question.