Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   Crossplatform   Server (Not)   Client   Components   Old   Guides
New in version: 5.0   5.1   5.2   5.3   5.4   6.0   6.1   6.2   6.3   6.4   6.5   7.0   7.1    Statistic  

WebView.InstallCallback

This function needs to be called one time to enable JavaScript to reach out out from the web viewer to run a FileMaker Script.

Component: WebView
Version: 1.3
Mac OS X: Yes
Windows: Yes
Server: No
FileMaker Cloud: No

MBS( "WebView.InstallCallback" )

Parameters

none

Description

This function needs to be called one time to enable JavaScript to reach out out from the web viewer to run a FileMaker Script.
One strategy is to call this function on start-up before any WebViewers have been displayed.

To call back from Javascript to FileMaker, you assign a string to the window.status property:

window.status="Filename:Scriptname"
or
window.status="Filename:Scriptname:Parameter"

The Parameter part can contain ":". Filename must include file extensions so FileMaker finds the database file.

You can also call it within a link with "javascript:window.status='Filename:Scriptname:Parameter'". Like this: href="javascript:window.status='callbacks.fp7:Another Script:Hello World'".
Does not work currently with Internet Explorer 10 on Windows.

Not supported for WebKit 2.x (FileMaker 16 Mac).

Examples

Install Callbacks

MBS("WebView.InstallCallback")


WebView.GoForward   -   WebView.InstallMultiFileOpenDialog

Feedback: Report problem or ask question.




Links
MBS REAL studio tutorial videos - Bilder aus Nickenich