Software tips, techniques, and news.

By Devin Drake  Posted on  May 20th, 2020  in  Free Downloads, Web, Claris FileMaker

FileMaker JavaScript Web Viewer Integration

The new FileMaker JavaScript Web Viewer Integration creates seamless communication between FileMaker and web viewers. This integration will allow for more efficient development of web viewers which will extend the functionality of FileMaker systems with features not native to FileMaker. The integration comes with a new script step called “Perform JavaScript In Web Viewer,” and JavaScript function, FileMaker.PerformScript(), both of which we will explore in this article.

Performing FileMaker Script From JavaScript

The ability to perform FileMaker scripts from JavaScript is fairly simple but does have some caveats. The function itself is

FileMaker.PerformScript( "Script Name", "Optional Script Parameters");

There are some considerations when using this function:

  • The JavaScript will not wait for the FileMaker script to complete.
  • The function will not be available until the web page has finished loading.
  • Web viewers now have a setting that needs to be enabled. That setting being “Allow JavaScript to perform FileMaker scripts” found in the Web Viewer Setup dialog.
  • This function follows the Same Domain Policy, meaning this function will only work if the database and web app are hosted under the same domain. If they are not the browser will block the code.
Web Viewer Setup Dialog

Performing JavaScript From FileMaker

To perform JavaScript from FileMaker, call the new Perform JavaScript in Web Viewer script step.

Perform JavaScript in Web Viewer Dialog

The parameters of the script step are:

  • Object Name: The defined name we give the web viewer.
  • Function Name: The name of the JavaScript function we want to run.
  • Parameter: Any parameters we want to pass into our Javascript function.

Some considerations:

  • The JavaScript function’s return value is ignored.
  • The script step will wait for the JavaScript function to return, if the JavaScript function enters an infinite loop the whole FileMaker solution will come to a halt.
  • When executing the script step, there will be no way for a user to cancel the operation or perform any other operations.
  • If the web viewer object is not visible the script step will not be executed.
  • Once the script step is called and the JavaScript function runs, error handling will be done through the web browser. Any errors that occur in the FileMaker solution will be handled in the same way we do error handling now.


Web viewers are an incredible tool in FileMaker’s arsenal giving solutions ways of gathering and displaying information not native to FileMaker itself. The JavaScript integration now allows implementation of web viewers to be even easier by updating how to develop communication between the web app and FileMaker. Contact us if you need assistance with web viewers in your custom FileMaker application!

Did you know we are an authorized reseller for Claris FileMaker Licensing?
Contact us to get a competitive quote on a Claris FileMaker License.

Download the JavaScript Web Viewer Integration File
Please complete the form below to download your FREE FileMaker file.
FileMaker Experience *
Terms of Use *
OPT-IN: I agree that I am downloading a completely free FileMaker application file with no strings attached. This file is unlocked, and I may use it for my business or organization as I see fit. Because I am downloading a free file, I agree that I should receive occasional marketing. I understand that I can OPT-OUT of these emails at anytime.
Devin Drake thumbnail
Devin Drake

Devin is a certified FileMaker and web developer who is outgoing, easily approachable, and places a high value on collaboration and supporting others.

FileMaker 18 Certified Developer
FileMaker 17 Certified Developer
FileMaker 16 Certified Developer
FileMaker 15 Certified Developer
FileMaker 14 Certified Developer
FileMaker 13 Certified Developer
FileMaker 12 Certified Developer
FileMaker 11 Certified Developer
"We were actually able to add more features than we thought would be possible within our budget. We always experienced a ‘can do’ attitude and DB Services was incredibly patient and easy to work with."
Courtney Hartman
Art Director
"The new FileMaker custom website interface is very user-friendly and easy to follow for our clients. In addition, it is much faster than the old Instant Web Publishing (IWP) interface. Thank you and all the others who have helped us out at DB Services. I am very grateful for the excellent service you provide us. Its nice to know we can call you for help if we have an issue."
Wayne Capek
"We needed a solution that would simplify the administration of our responsibilities under our contract with the State of Indiana. We have seen a dramatic increase across the state in the number of potential foster and adoptive parents that have begun the preparation and training process. This increase has resulted in a significant opportunity for children available for adoption. That’s a big win for everyone! And it’s all because we can refer potential parents to the proper state contacts efficiently and quickly."
Chris Morrison
Executive Director
"Thank you for all of your expertise and valuable help. I am so grateful to have found DB Services."
Linda Findlay
"Thank you for our new database system. We transitioned from a carbon copy paper based system to a digital database. The software has saved us time and money. We used to archive all our jobs in cabinets, now we can look up a job in seconds from anywhere. The software allows us to easily email estimates to our customers in pdf format. In a year there was a return on investment just from eliminating the purchasing of our carbon forms."
Todd Cartmel
"The new system allows us to create and track jobs for customers along with inventory, something we had been doing with separate word and spreadsheet files. Because it’s now so intuitive, new staff members are able to begin using the database immediately without our usual training session and ‘cheat sheets’ for getting around within the file."
Tom Andrews