1 Reply Latest reply on Jan 14, 2014 10:38 AM by tmcclure0501

    Javascript Does Not Execute inside Process or Task Form

    tmcclure0501

      When designing a process or task form the javascript does not execute when it is rendered inside the form viewer associated with tasks and processes.  JavaScript does execute when in the HTML editor.   I cannot even get a simple javascript alert window to work.  I realize I must be missing something

        • 1. Re: Javascript Does Not Execute inside Process or Task Form
          tmcclure0501

          my 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.

          1 of 1 people found this helpful