Topics
All
Mac OS X
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Guides
Examples
New in version:
7.4
7.5
8.0
8.1
8.2
8.3
8.4
8.5
9.0
9.1
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 |
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
- WebViewer/Latitude Longitude Lookup
- WebViewer/Form Fields/Forms Sample 2
- WebViewer/Form Fields/Forms Sample
- WebViewer/Copy text from nicedit.com website
- WebViewer/Google Translation
Blog Entries
Created 18th August 2014, last changed 18th August 2014
WebView.RunJavaScript - WebView.Screenshot
Feedback: Report problem or ask question.
Links
MBS FileMaker tutorial videos