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

Release notes

Example Databases

Blog Entries

This function checks for a license.

Created 18th August 2014, last changed 16th January 2023


WebView.ExecCommand - WebView.FindWindowByIndex