Jump to content

Calling a script from a Web Viewer on WebDirect


Recommended Posts

Hi there! Long time. :)

Question about Carafe on WebDirect. With the Google Maps bundle, a script is called when the user clicks on the marker. This works perfectly in Pro (woot!). But if I try through WD, the FMP URL wants to open up FM, the app, instead of running the script within the WD instance. Is there a way around this? In short, I'm trying to open a card window (v19) when the user clicks on a marker.

 

Thanks for all of your hard work on this.

Link to post
Share on other sites
21 hours ago, mz123 said:

With the Google Maps bundle, a script is called when the user clicks on the marker. This works perfectly in Pro (woot!). But if I try through WD, the FMP URL wants to open up FM, the app, instead of running the script within the WD instance. Is there a way around this?

Yes! Bundles that are compatible with versions of FileMaker Server less than 19 do not have the option of using the new FileMaker.PerformScript function they added.

So far all the bundles we've got published up here are created to support the FMP URL technique. I'll let you know when we have a WebDirect 19 compatible version. Are you using the Carafe Add-on or the Kitchen style of deployment?

Link to post
Share on other sites

Hi Martha,

The change to support FileMaker.PerformScript in 19 is very simple, so I went ahead and updated the GoogleMaps bundle to 3.0.5 with support for a new config option "useFmpUrl" which defaults to "true". If you change that to "false" you will get the new behavior.

Please note, in testing this I discovered a fixed issue in 19 which we had previously needed to work around in WebDirect by base64 encoding the dataurl. This still worked fine, but as it turns out, broke the PerformScript feature. So now there is version detection, so it can work properly in both 19 and earlier versions. You'll need to deploy with Carafe Add-on 0.3.0+ or Carafe Kitchen 3.1.3+ which I just pushed up to https://carafe.fm/downloads/ a few minutes ago.

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.