| Components | All | New | MacOS | Windows | Linux | iOS | ||||
| Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old | |
Overlay.AddWebViewer
Adds a web viewer to an overlay.
| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
| Overlay | 14.2 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |
MBS( "Overlay.AddWebViewer"; OverlayRef { ; Flags } ) More
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| OverlayRef | The overlay window reference number. | $overlay | |
| Flags | Pass 1 to allow triggering scripts from JavaScript. Pass 2 to allow FileMaker.Evaluate in JavaScript. Pass 3 to allow both. Default is 0. |
3 | Optional Added in version 16.2. |
Result
Returns webviewer reference number or error.
Description
Adds a web viewer to an overlay.The web pages loaded can define a transparent background to make the whole page transparent. Then you can have things on top, that can have round borders or other transparency effects.
e.g. the body may be set to style="background:rgba(255, 255, 255, 0); margin: 0; height: 100%; overflow: hidden;" and a div in front of it could have round rectangles and a red background with style="border-radius: 15px; background:rgba(255, 100, 100, 1); height:100px; padding:5px;".
If the loaded website has no background, mouse clicks may fall through.
This is similar to WebView.CreateWithControl and creates the same web viewer on the overlay.
You can fmp: URLs and use FileMaker.PerformScript just like FileMaker's web viewer. For FileMaker.PerformScriptWithOption the option can be 1 for halt, 2 for exit, 3 for resume, 4 for pause. 0 is pause instead of continue and 6 is resume instead of Suspend and Resume since the plugin can't do these modes.
e.g. trigger a script:
FileMaker.PerformScript( "Script name", "Optional Parameter");
You can use FileMaker.Evaluate to directly evaluate something from JavaScript. e.g. query a get function like this:
let filename = await FileMaker.Evaluate('Get(FileName)');
Examples
Creates an overlay with a web viewer and load an URL into it:
Set Variable [ $overlay ; Value: MBS("Overlay.Create") ]
Set Variable [ $r ; Value: MBS("Overlay.SetFrame"; $overlay; 100; 100; 300; 120) ]
Set Variable [ $$web ; Value: MBS("Overlay.AddWebViewer"; $overlay) ]
Set Variable [ $r ; Value: MBS("WebView.LoadURL"; $$web; "https://monkeybreadsoftware.com/filemaker/examples/transparent.html") ]
Set Variable [ $r ; Value: MBS("Overlay.SetVisible"; $overlay; 1) ]
Set Variable [ $$overlay ; Value: $overlay ]
Set Variable [ $r ; Value: MBS("Overlay.SetFrame"; $overlay; 100; 100; 300; 120) ]
Set Variable [ $$web ; Value: MBS("Overlay.AddWebViewer"; $overlay) ]
Set Variable [ $r ; Value: MBS("WebView.LoadURL"; $$web; "https://monkeybreadsoftware.com/filemaker/examples/transparent.html") ]
Set Variable [ $r ; Value: MBS("Overlay.SetVisible"; $overlay; 1) ]
Set Variable [ $$overlay ; Value: $overlay ]
See also
- Overlay.Create
- Overlay.SetFrame
- Overlay.SetVisible
- WebView.Create
- WebView.CreateWithControl
- WebView.LoadURL
Release notes
- Version 16.2
- Added flags parameter for Overlay.AddWebViewer, WebView.Create, WebView.CreateWindow and WebView.CreateWithControl functions to control whether script triggers or Evaluate are allowed.
- Version 16.0
- Improved Overlay.AddWebViewer on handle fmp:// URL within the WebViewer and trigger them in FileMaker.
- Version 14.5
- Added Overlay.AddWebViewer function.
Example Databases
Blog Entries
- Neues MBS Plugin 16.2 für Claris FileMaker
- MBS Plugin 16.2 for Claris FileMaker
- MBS FileMaker Plugin, version 16.2pr3
- Neues MBS Plugin 16.0 für Claris FileMaker
- MBS Plugin 16.0 for Claris FileMaker - More than 7800 functions in one plugin
- MBS FileMaker Plugin, version 15.6pr1
- Add a WebViewer to an Overlay window
- MBS FileMaker Plugin 14.5 for Claris FileMaker
- MBS FileMaker Plugin, version 14.5pr8
- MBS FileMaker Plugin, version 14.5pr4
FileMaker Magazin
This function checks for a license.
Created 17th March 2024, last changed 17th April 2026