AnsweredAssumed Answered

Filemaker Server 15 WebDirect Javascript Button Triggering

Question asked by NateBrock73072 on Sep 18, 2016
Latest reply on Nov 18, 2016 by NateBrock73072

Everyone,

 

I am working on migrating from filemaker server 12 with IWP. I currently use it on some iPods through safari.

I am able to call a javascript function that correlates to a button on the layout to process a barcode scan.

 

Example of that code:

 

function iwpExecute(){

  CancelEventPropagation.call();

  top.iwp.executebuttonscript(176,'recnumField','recnumField');

  }

 

The 176 references a number assigned to the button on the layout.

 

Calling this function in a webviewer worked perfectly for 5 years now.

 

 

Moving on:

 

Filemaker 15 Webdirect doesn't have a clear cut way of processing a script from javascript.

I tried the http://wwww.example.com/fmi/webd#MyDB?script=Test

This doesn't always take and it will frequently ask for a username and password over and over again.

Which end users would hate.

 

I would like to trigger the button with a javascript function to proceed processing.

But Webdirect uses a ton of eventlisteners, but the one that gets triggered is an anonymous function with random letters and values in a return function. I tried .click() events, mousedown, mouseup, click simulations on the button( ref by element id) BUT NOTHING WORKS.

 

Any advice on making a script in Webdirect run via javascript or otherwise but in a clean worry free manner?

 

Thanks All!

Outcomes