naio Posted July 24, 2020 Posted July 24, 2020 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()?
naio Posted July 25, 2020 Author Posted July 25, 2020 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.
Recommended Posts
This topic is 1638 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 accountSign in
Already have an account? Sign in here.
Sign In Now