Jump to content
Server Maintenance This Week. ×

Pass Java variables from web viewer to script


kdefilip

This topic is 3140 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I currently have a web viewer that contains a google map.  On this map I can draw a rectangle to select an area of the map.  I collect the the latitude and longitude of the southwest corner and northeast corner into java variables.  I am able to print these java variables on the web viewer.  They look like this in the web viewer and are formatted in such a way as to be ready for a search range in FMP:

NE: 43.02144735023339...43.06470481674727
SW: -76.24412939453123...-76.07445532226564

I would like to collect each of these variables and pass them back to a FileMaker scrip which will perform a find on two fields.

Is there a way to grab these two Variables from the web viewer and pass to a FMP script for searching the data held within FMP layout

Link to comment
Share on other sites

There are two different directions to approach this from:

  1. Pulling the data from FileMaker. A script can use the GetLayoutObjectAttribute function to pull content from the web viewer, then parse your data out of the result.
  2. Pushing the data from the web viewer. Your JavaScript can use an fmp URL to call a script and pass your data as parameters.
Link to comment
Share on other sites

I'm not sure that is what I am looking for.  That appears to be opening a FMP database and then looking for a specific FMP file.

<a href="FMP://$/MyFMPDB/script=isolate&$msg">Isolate</a></div>

This string gives the resulting error:

"The File 'MyFMPDB.fmp12/script=isolate&$msg.fmp12" could not be opened. Either the host is not available, or the file is not available on that host"

My intention is to pass a java variable which is generated within the webviewer back to a script within the same FMP DB.  In other words, the variable name is 'msg', but this piece of code seems to interpret the 'msg' as a FMP DB name.

 

 

Link to comment
Share on other sites

This topic is 3140 days old. Please don't post here. Open a new topic instead.

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.