I have written a short line of code as a custom html in the web viewer such that when the link present in the web viewer is clicked it runs a particular script in the file with a parameter. It looks like this:
<a href='"&"FMP://" & Get(SystemIPAddress)
&"/"& Get ( FileName )& "?script=<scriptName>¶m=" & <someField> &"'>View Map Detail</a>
Now I know that this web viewer is doing what i want it to do. upon clicking the link the script is executed with the appropriate parameter. However each time the link is clicked filemaker reopens the file that i am trying to work with and asks me to reauthenticate and then runs the script. The functionality i want is for the link to be clicked in the web viewer and the script to run in the same (currently open) file.
in case it helps, sharing is turned on, and when the script runs it reopens the file with the title: FileName (ComputerName)