July 24, 20205 yr 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()?
July 25, 20205 yr Author 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.
Create an account or sign in to comment