Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
WebView.FindByName
Returns a unique ID that references a the web viewer.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebView | 1.3 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
MBS( "WebView.FindByName"; WindowRef; WebViewerObjectName ) More
Parameters
Parameter | Description | Example |
---|---|---|
WindowRef | Window Reference is the unique OS level window ID. You can obtain this by using the Window.FindByTitle or Window.FindByIndex functions. Pass zero to access the frontmost window. | 0 |
WebViewerObjectName | The name of the Web Viewer as set in the object info palette. | "web" |
Description
Returns a unique ID that references a the web viewer.This function is used by all the other functions to target the correct web viewer. This function requires the WindowRef that is returned by the WebView.FindWindowByTitle function. Known Issues: In FileMaker 9, the WebView control must have the Display Progress Bar and Display Status Messages check boxes set to "unchecked" FileMaker 8,Windows PC only. The WebView Control can not be set to have "zero" line width on it's border. With the release of 1.4 this function became optional. You can now access a WebViewer by its name. But this is still useful in some scenarios. If you are trying to get a handle on WebViewer that is displayed in List mode, you must use this method.
The WebViewer reference is only valid until FileMaker destroys the WebViewer. So better search again when you move to a new record or change the window.
The WebViewer must have content to be found. If you don't load a page, you should still put an "about:blank" URL there.
You may need to have a script pause for FileMaker to create the web viewer after a layout change. If you use Freeze Window command, the layout may not be drawn and thus the plugin may not find the web viewer.
Examples
Find the Web View ID
Let(
[
WebViewerName = "web";
WindowRef = MBS("Window.FindByTitle"; Get(WindowName))
];
MBS("WebView.FindByName"; WindowRef; WebViewerName)
)
Find Webviewer in current window:
MBS("WebView.FindByName"; Get(WindowName); "web")
See also
- WebView.SetPreferences
- WebView.SetSilent
- WebView.SetTitle
- WebView.SetVirtualHostNameToFolderMapping
- WebView.ShowDebugBar
- WebView.ShowDevTools
- WebView.StopLoading
- WebView.UserScripts
- WebView.ZoomPageIn
- WebView.ZoomPageOut
Release notes
- Version 13.2
- Fixed WebView.FindByName function to find web viewer better on other windows for macOS.
- Version 9.5
- Fixed problem with WebView.FindByName function not finding right web viewer on MacOS.
- Version 9.1
- Changed WebView.FindByName to better find web viewer.
- Fixed bug in WebView.FindByName for Mac.
Example Databases
- WebViewer/Disable Javascript alerts on Webviewer Mac
- WebViewer/Form Fields/Benchmark
- WebViewer/Form Fields/Forms Sample
- WebViewer/Form Fields/WebViewer Forms
Blog Entries
- Printing a WebViewer in FileMaker
- MBS FileMaker Plugin, version 13.2pr4
- MBS FileMaker Plugin, version 9.5pr7
- Web viewer exists only with URL loaded
- MBS FileMaker Plugin, version 9.1pr4
- MBS FileMaker Plugin, version 9.1pr1
FileMaker Magazin
- Ausgabe 3/2024, Seite 30
- Ausgabe 1/2008, Seite 32
This function checks for a license.
Created 18th August 2014, last changed 16th January 2023