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

MBS FileMaker Plugin Example Databases

WebViewer Links

All examples are included with download of MBS FileMaker Plugin.

WebViewer Links.fmp12

Overview
Tables 1
Relationships 0
Layouts 1
Scripts 2
Value Lists 0
Custom Functions 0
Custom Menus 32
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Minimalist
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password On
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
Start
0 fields defined, 1 record
Start

Layout Objects: Start

Buttons

Button Properties Coordinates Script/Script Step
    Type:
  • Text: Get Links
  • Top: 6 pt
  • Left: 8 pt
  • Bottom: 31 pt
  • Right: 133 pt
  • Anchoring: Left, Top
Perform Script [ “GetLinks” ]

Scripts:


Button Properties Coordinates Script/Script Step
    Type:
  • Text: First Link
  • Top: 6 pt
  • Left: 146 pt
  • Bottom: 31 pt
  • Right: 271 pt
  • Anchoring: Left, Top
Show Custom Dialog [ Title: "Links"; Message: MBS("WebView.GetLink"; "web";0; "href"); Default Button: “OK”, Commit: “Yes” ]

Button Properties Coordinates Script/Script Step
    Type:
  • Text: Count Links
  • Top: 6 pt
  • Left: 284 pt
  • Bottom: 31 pt
  • Right: 409 pt
  • Anchoring: Left, Top
Show Custom Dialog [ Title: "Link Count"; Message: MBS("WebView.GetLinkCount"; "web"); Default Button: “OK”, Commit: “Yes” ]

Button Properties Coordinates Script/Script Step
    Type:
  • Text: Fix Links
  • Top: 667 pt
  • Left: 8 pt
  • Bottom: 697 pt
  • Right: 184 pt
  • Anchoring: Left, Bottom
Perform Script [ “Fix Links” ]

Scripts:


Web Viewer Controls

Web Viewer Control Properties Coordinates Web Address
    Object Name:
  • web
    Additional Properties:
  • Allow interaction with web viewer content
  • Display progress bar
  • Display status messages
  • Automatically encode URL
  • Top: 36 pt
  • Left: 8 pt
  • Bottom: 622 pt
  • Right: 944 pt
  • Anchoring: Left and Right, Top and Bottom
"http://www.monkeybreadsoftware.de/"

Script Hierarchy

GetLinks
Fix Links

Next Script: [Fix Links]
Script Name GetLinks
Run script with full access privileges Off
Siri Shortcut Visible Off
Include In Menu Yes
Layouts that use this script
Scripts that use this script
    Script Definition
    Script Steps
    • Set Variable [ $Count; Value:MBS("WebView.GetLinkCount"; "web") ]
    • Set Variable [ $Index; Value:0 ]
    • Set Variable [ $links; Value:"" ]
    • Loop [ Flush: Always ]
    • Exit Loop If [ $Index ≥ $Count ]
    • Set Variable [ $links; Value:$links & MBS("WebView.GetLink"; "web"; $Index; "href") & " -> " & MBS("WebView.GetLink"; "web"; $Index; "innertext") & "¶" ]
    • Set Variable [ $Index; Value:$Index+1 ]
    • End Loop
    • Show Custom Dialog [ Title: "Alle Links"; Message: $links; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, 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

                  Previous Script: [GetLinks]
                  Script Name Fix Links
                  Run script with full access privileges Off
                  Siri Shortcut Visible Off
                  Include In Menu No
                  Layouts that use this script
                  Scripts that use this script
                    Script Definition
                    Script Steps
                    • #run a little JavaScript to change target values for all links
                    • #target is _blank to open in new tab.
                    • Set Variable [ $result; Value:MBS("WebView.RunJavaScript"; "browser"; "for (i = 0; i<document.links.length; i++) { if (document.links[i].target == '_blank') document.links[i].target = ''; }") ]
                    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: WebViewer Links

                                  Used functions: