-
1. Re: Javascript Does Not Execute inside Process or Task Form
tmcclure0501 Jan 14, 2014 10:38 AM (in response to tmcclure0501)1 of 1 people found this helpfulmy man got javascript to work inside process and task forms - his comments below:
I got datatables and javascript working inside the FORMS. It turns out that javascript libraries and all custom functions must be added to the scope of the application, Adding them just inside the forms doesn’t work, but adding the javascript inside the “app.html.template” file that is loaded when the APP start up, fixes the issue.
Also using all javascript Body.onload, does not work because it doesn’t pick up the body of the FORM, but the Body of the application. So we still need to figure out how to trigger custom javascript when the form is loaded. I got the javascript working with a “onclick” event for a checkbox, but not when the form load yet automatically.
We also have to figure out a better way to add new custom javascript function to the scope of the form during run time, because this current approach requires that we include all the javascript during compile time and load all of it when the app starts.