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.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    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 Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
WebView 1.3 Yes Yes No No 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), but works in FileMaker 16, when using a Web Viewer created using WebView.Create.

Examples

Install Callbacks

MBS("WebView.InstallCallback")

See also

Example Databases


WebView.GoForward   -   WebView.InstallMultiFileOpenDialog

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins