Page 1 of 1

JS in External Libs won't load in all the browsers

Posted: Mon Oct 03, 2022 2:54 am
by RafiQuaziGhulam
Dear Concern,
I'm loading JS through external libs that manipulates form elements of the dynaform. However, the JS whenever I am manipulating the file, the changes won't reflect on the DOM as the JS file isn't loading after the changes, and often requires manual forced loading. How can I add the JS file so that it loads every time without requiring any intervention?

I have tried following this https://wiki.processmaker.com/3.1/JavaScript_in_DynaForms#Importing_files_referencing_Dynaform_objects
However, it does not work as the JS needs to load before the dynaform, that is, on load.

Re: JS in External Libs won't load in all the browsers

Posted: Thu Oct 06, 2022 10:30 pm
by Ironguts25
You can download the JS file to your processmaker public_html directory and add the file name to your Dynaform's external libs property. Note however that the public_html directory will be overwritten when Processmaker is upgraded. To protect from this, you can create a plugin and save all your files including logo's etc to your plugin's public_html folder.

Or you can copy and paste the JS code directly into the Dynaform's JavaScript property. Note however if there is an error in the JS code, your Dynaform will not load.

Let me know if this works for you.

Re: JS in External Libs won't load in all the browsers

Posted: Thu Sep 14, 2023 3:46 am
by Emmal21
You are sure you are linking to the same file and then editing that same file?
On some browser, you can use CTRL F5 to force a refresh (on the PC). On the Mac, it is Cmd Shift R
Firebug also has a net tab with "Disable Browser Cache".