Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Custom WebView

All examples are included with download of MBS FileMaker Plugin.

Custom WebView.fmp12

Overview
Tables1
Relationships0
Layouts1
Scripts11
Value Lists0
Custom Functions0
Custom Menus24
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Own WebView
3 fields defined, 1 record
Own WebView

Fields

Table Name: Own WebView - 3 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
ContainerNormal, BinaryAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
      TextNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          JavaScriptNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German

              Layout Objects: Own WebView

              Regular Fields

              Field Name: Own WebView::Container
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 502 pt
              • Left: 92 pt
              • Bottom: 676 pt
              • Right: 348 pt
              • Anchoring: Left, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              No

              Field Name: Own WebView::Text
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 503 pt
              • Left: 399 pt
              • Bottom: 676 pt
              • Right: 652 pt
              • Anchoring: Left, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              Yes

              Field Name: Own WebView::JavaScript
              Field PropertiesCoordinatesField FormatField BehaviorQuick Find
              • Top: 655 pt
              • Left: 676 pt
              • Bottom: 676 pt
              • Right: 929 pt
              • Anchoring: Left, Top
              Field Format:
              • Edit Box
              Field Behavior:
              • Allow field to be entered: In Find mode, In Browse mode
              • Touch keyboard type: Default for Data Type
              • Go to next field using: Tab key
              Yes

              Buttons

              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Create WebView
              • Top: 13 pt
              • Left: 13 pt
              • Bottom: 38 pt
              • Right: 137 pt
              • Anchoring: Left, Top
              Perform Script [ “Create WebView” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Render Image
              • Top: 13 pt
              • Left: 146 pt
              • Bottom: 38 pt
              • Right: 270 pt
              • Anchoring: Left, Top
              Perform Script [ “Render Image” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Render PDF
              • Top: 13 pt
              • Left: 279 pt
              • Bottom: 38 pt
              • Right: 403 pt
              • Anchoring: Left, Top
              Perform Script [ “Render PDF” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Formatted Text
              • Top: 13 pt
              • Left: 412 pt
              • Bottom: 38 pt
              • Right: 536 pt
              • Anchoring: Left, Top
              Perform Script [ “get Formatted Text” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: HTML Text
              • Top: 13 pt
              • Left: 545 pt
              • Bottom: 38 pt
              • Right: 669 pt
              • Anchoring: Left, Top
              Perform Script [ “get HTML Text” ]

              Scripts:


              Button PropertiesCoordinatesScript/Script Step
                Type:
              • Text: Print To PDF
              • Top: 13 pt
              • Left: 678 pt
              • Bottom: 38 pt
              • Right: 802 pt
              • Anchoring: Left, Top
              Perform Script [ “Print To PDF” ]

              Scripts:


              Script Hierarchy

              Create WebView
              Render Image
              Screenshot
              Render PDF
              get Formatted Text
              get HTML Text
              Print To PDF
              Clear
              Close Webview
              Install Message Handler
              test

              Next Script: [Render Image]
              Script NameCreate WebView
              Run script with full access privilegesOff
              Siri Shortcut VisibleOff
              Include In MenuYes
              Layouts that use this script
              Scripts that use this script
                Script Definition
                Script Steps
                • #create with size on window
                • // Set Variable [ $x; Value:10 ]
                • // Set Variable [ $y; Value:60 ]
                • // Set Variable [ $w; Value:970 ]
                • // Set Variable [ $h; Value:440 ]
                • //
                • // Set Variable [ $$web; Value:MBS("WebView.Create"; 0; $x; $y; $w; $h) ]
                • #create with control on window
                • #pass 1 for WebKit 1.x and 2 for WebKit 2.x
                • Set Variable [ $$web; Value:MBS("WebView.CreateWithControl"; 0; "placeholder"; 2) ]
                • Set Variable [ $r; Value:MBS( "WebView.LoadURL"; $$web; "https://www.mbsplugins.de/filemaker") ]
                Fields used in this script
                  Scripts used in this script
                    Layouts used in this script
                      Tables used in this script
                        Table occurrences used by this script
                          Custom Functions used by this script
                            Custom menu set used by this script

                              Previous Script: [Create WebView]Next Script: [Screenshot]
                              Script NameRender Image
                              Run script with full access privilegesOff
                              Siri Shortcut VisibleOff
                              Include In MenuYes
                              Layouts that use this script
                              Scripts that use this script
                                Script Definition
                                Script Steps
                                • Set Field [ Own WebView::Container; MBS( "WebView.RenderImage"; $$web; "PNG"; "webview.png") ]
                                Fields used in this script
                                Scripts used in this script
                                  Layouts used in this script
                                    Tables used in this script
                                    Table occurrences used by this script
                                    Custom Functions used by this script
                                      Custom menu set used by this script

                                        Previous Script: [Render Image]Next Script: [Render PDF]
                                        Script NameScreenshot
                                        Run script with full access privilegesOff
                                        Siri Shortcut VisibleOff
                                        Include In MenuYes
                                        Layouts that use this script
                                          Scripts that use this script
                                            Script Definition
                                            Script Steps
                                            • Set Field [ Own WebView::Container; MBS( "WebView.Screenshot"; $$web; "PNG"; "webview.png") ]
                                            Fields used in this script
                                            Scripts used in this script
                                              Layouts used in this script
                                                Tables used in this script
                                                Table occurrences used by this script
                                                Custom Functions used by this script
                                                  Custom menu set used by this script

                                                    Previous Script: [Screenshot]Next Script: [get Formatted Text]
                                                    Script NameRender PDF
                                                    Run script with full access privilegesOff
                                                    Siri Shortcut VisibleOff
                                                    Include In MenuYes
                                                    Layouts that use this script
                                                    Scripts that use this script
                                                      Script Definition
                                                      Script Steps
                                                      • Set Field [ Own WebView::Container; MBS( "WebView.RenderPDF"; $$web; "webview.pdf") ]
                                                      Fields used in this script
                                                      Scripts used in this script
                                                        Layouts used in this script
                                                          Tables used in this script
                                                          Table occurrences used by this script
                                                          Custom Functions used by this script
                                                            Custom menu set used by this script

                                                              Previous Script: [Render PDF]Next Script: [get HTML Text]
                                                              Script Nameget Formatted Text
                                                              Run script with full access privilegesOff
                                                              Siri Shortcut VisibleOff
                                                              Include In MenuYes
                                                              Layouts that use this script
                                                              Scripts that use this script
                                                                Script Definition
                                                                Script Steps
                                                                Fields used in this script
                                                                Scripts used in this script
                                                                  Layouts used in this script
                                                                    Tables used in this script
                                                                    Table occurrences used by this script
                                                                    Custom Functions used by this script
                                                                      Custom menu set used by this script

                                                                        Previous Script: [get Formatted Text]Next Script: [Print To PDF]
                                                                        Script Nameget HTML Text
                                                                        Run script with full access privilegesOff
                                                                        Siri Shortcut VisibleOff
                                                                        Include In MenuYes
                                                                        Layouts that use this script
                                                                        Scripts that use this script
                                                                          Script Definition
                                                                          Script Steps
                                                                          Fields used in this script
                                                                          Scripts used in this script
                                                                            Layouts used in this script
                                                                              Tables used in this script
                                                                              Table occurrences used by this script
                                                                              Custom Functions used by this script
                                                                                Custom menu set used by this script

                                                                                  Previous Script: [get HTML Text]Next Script: [Clear]
                                                                                  Script NamePrint To PDF
                                                                                  Run script with full access privilegesOff
                                                                                  Siri Shortcut VisibleOff
                                                                                  Include In MenuYes
                                                                                  Layouts that use this script
                                                                                  Scripts that use this script
                                                                                    Script Definition
                                                                                    Script Steps
                                                                                    Fields used in this script
                                                                                    Scripts used in this script
                                                                                      Layouts used in this script
                                                                                        Tables used in this script
                                                                                        Table occurrences used by this script
                                                                                        Custom Functions used by this script
                                                                                          Custom menu set used by this script

                                                                                            Previous Script: [Print To PDF]Next Script: [Close Webview]
                                                                                            Script NameClear
                                                                                            Run script with full access privilegesOff
                                                                                            Siri Shortcut VisibleOff
                                                                                            Include In MenuYes
                                                                                            Layouts that use this script
                                                                                              Scripts that use this script
                                                                                                Script Definition
                                                                                                Script Steps
                                                                                                • Set Field [ Own WebView::Container; "" ]
                                                                                                • Set Field [ Own WebView::Text; "" ]
                                                                                                Fields used in this script
                                                                                                Scripts used in this script
                                                                                                  Layouts used in this script
                                                                                                    Tables used in this script
                                                                                                    Table occurrences used by this script
                                                                                                    Custom Functions used by this script
                                                                                                      Custom menu set used by this script

                                                                                                        Previous Script: [Clear]Next Script: [Install Message Handler]
                                                                                                        Script NameClose Webview
                                                                                                        Run script with full access privilegesOff
                                                                                                        Siri Shortcut VisibleOff
                                                                                                        Include In MenuYes
                                                                                                        Layouts that use this script
                                                                                                          Scripts that use this script
                                                                                                            Script Definition
                                                                                                            Script Steps
                                                                                                            • If [ Length ( $$web ) > 0 ]
                                                                                                            • Set Variable [ $r; Value:MBS("WebView.Close"; $$web) ]
                                                                                                            • Set Variable [ $$web; Value:"" ]
                                                                                                            • End If
                                                                                                            Fields used in this script
                                                                                                              Scripts used in this script
                                                                                                                Layouts used in this script
                                                                                                                  Tables used in this script
                                                                                                                    Table occurrences used by this script
                                                                                                                      Custom Functions used by this script
                                                                                                                        Custom menu set used by this script

                                                                                                                          Previous Script: [Close Webview]Next Script: [test]
                                                                                                                          Script NameInstall Message Handler
                                                                                                                          Run script with full access privilegesOff
                                                                                                                          Siri Shortcut VisibleOff
                                                                                                                          Include In MenuYes
                                                                                                                          Layouts that use this script
                                                                                                                            Scripts that use this script
                                                                                                                              Script Definition
                                                                                                                              Script Steps
                                                                                                                              • Set Variable [ $r; Value:MBS( "WebView.AddScriptMessageHandler"; $$web; "FileMaker" ) ]
                                                                                                                              • Set Variable [ $r; Value:MBS( "WebView.Evaluate"; $$web; Own WebView::JavaScript ) ]
                                                                                                                              • #trigger it with FileMaker.PerformScript('test', 'hello'); in JavaScript
                                                                                                                              Fields used in this script
                                                                                                                              Scripts used in this script
                                                                                                                                Layouts used in this script
                                                                                                                                  Tables used in this script
                                                                                                                                  Table occurrences used by this script
                                                                                                                                  Custom Functions used by this script
                                                                                                                                    Custom menu set used by this script

                                                                                                                                      Previous Script: [Install Message Handler]
                                                                                                                                      Script Nametest
                                                                                                                                      Run script with full access privilegesOff
                                                                                                                                      Siri Shortcut VisibleOff
                                                                                                                                      Include In MenuNo
                                                                                                                                      Layouts that use this script
                                                                                                                                        Scripts that use this script
                                                                                                                                          Script Definition
                                                                                                                                          Script Steps
                                                                                                                                          • Show Custom Dialog [ Title: "Script called"; Message: Get(ScriptParameter); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                                          Fields used in this script
                                                                                                                                            Scripts used in this script
                                                                                                                                              Layouts used in this script
                                                                                                                                                Tables used in this script
                                                                                                                                                  Table occurrences used by this script
                                                                                                                                                    Custom Functions used by this script
                                                                                                                                                      Custom menu set used by this script

                                                                                                                                                        Download example: Custom WebView

                                                                                                                                                        Used functions: