WebView.FindWindowByTitle
-------------------------

Returns the Window Reference for a window specified by the Index parameter.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [WebView](component_WebView.md) | [1.3](newinversion13.md) | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |

MBS( "WebView.FindWindowByTitle"; Title ) 

**MBS**( **"WebView.FindWindowByTitle";** /\* Returns the Window Reference for a window specified by the Index parameter. \*/  
**$Title**) /\* The title of the widowe.g. "Hello" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Title | The title of the widow | "Hello" |

### Result

Returns window reference number or error.

### Description

Returns the Window Reference for a window specified by the Index parameter.   
The Window Reference is a unique ID.  
The window reference is only valid until the window is closed.  
  
On normal FileMaker on desktop you can use Get(WindowName), but on FileMaker Server the name includes the server name, so you need to use: Get(WindowName) &amp; " (" &amp; Get(HostName) &amp; ")"  
If 0 is returned, no window was found.  
### Examples

Get the Window Reference of the current window

 MBS ( "WebView.FindWindowByTitle" ; Get(WindowName) )  
Find window reference on FileMaker Server where FileMaker includes server name in window name:

 MBS ( "WebView.FindWindowByTitle"; Get(WindowName) &amp; " (" &amp; Get(HostName) &amp; ")")  
### See also

- [WebView.FindByName](WebViewFindByName.md)
- [WebView.FindWindowByIndex](WebViewFindWindowByIndex.md)

### Example Databases

- [WebViewer/Disable Javascript alerts on Webviewer Mac](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebViewer/Disable%20Javascript%20alerts%20on%20Webviewer%20Mac.shtml#1ScriptAnchor_)
- [WebViewer/Form Fields/Benchmark](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebViewer/Form%20Fields/Benchmark.shtml#1ScriptAnchor_)
- [WebViewer/Form Fields/WebViewer Forms](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/WebViewer/Form%20Fields/WebViewer%20Forms.shtml#1ScriptAnchor_)
- [Window/Window Fade](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Window/Window%20Fade.shtml#5ScriptAnchor_)

Created 18th August 2014 , last changed 18th August 2014

  
[WebView.FindWindowByIndex](WebViewFindWindowByIndex.md) - [WebView.FormReset](WebViewFormReset.md)

[HTML Version](WebViewFindWindowByTitle.shtml)