Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.1   6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4    Statistic  

WebView.RunJavaScriptReturnTitle

Run the specified JavaScript and then returns the value of the title property to FileMaker.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WebView 1.4 Yes Yes No No Yes

MBS( "WebView.RunJavaScriptReturnTitle"; WebViewerRef; Javascript )

Parameters

Parameter Description Example value
WebViewerRef Either the Web Viewer Object Name or the Web Viewer ID as returned by "WebView.FindByName" function.
Javascript the text source of the javascript

Description

Run the specified JavaScript and then returns the value of the title property to FileMaker.
To return a result of the JavaScript to FileMaker, simply set "document.title" to the return value. Why did we do this? Because it was the way we could get the result back from the web view on windows. Use "\n" in javascript strings for a newline character.

Examples

Return the htmlcode of a field as string:

MBS( "WebView.RunJavaScriptReturnTitle"; "browser"; "document.title=document.getElementById('td_ProcName_v').innerHTML;" )

Return the text of a html item referenced by id as string:

MBS( "WebView.RunJavaScriptReturnTitle"; "browser"; "document.title=document.getElementById('Result').innerText;" )

See also

Example Databases


WebView.RunJavaScript   -   WebView.Screenshot

Feedback: Report problem or ask question.




Links
MBS FileMaker blog