Jump to content

Recommended Posts

I want to create dynamically a set of buttons to filter a portal, so when a button is clicked a FM Script is executed.

Here you can see the pen: https://codepen.io/naio/pen/NWxJExP, where the alert() is called, in FM I call the FM Script with FileMaker.PerformScript() and pass the inner content as parameter.

When I try this with static code in WebViewer it runs normally but when I substitute the set of buttons with a List(option_as_html_button) –the 'dynamic' part–, the FileMaker.PerformScript() doesn't work, even thought the HTML code is rendered correctly and there seems to be no error.

What's going on? are there limitations to the use of FileMaker.PerformScript()?

 

Link to post
Share on other sites

I've found the bug: javascript code started with a single line comment //. When the code was made a calculation, line feeds were removed and because of the double slash, all of the js code was read as a comment, this is why it wasn't executed.

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.