Does button element inline javascript code have a length limit?

sakyildiz

Member
I have a button element and a click event javascript inline code. Javascript code is quite long, 240 lines. It worked fine but after adding some more lines, the whole script fails. nothing happens. Is there a solution for that?
 
Put your JS in a form JS file (in ./components/com_fabrik/js/form_X.js, replace X with your numeric form ID), wrap it in a function like ...

Code:
function yourFunc() {
   // your code here
}

... and call yourFunc() from the button's JS action.

It's best practise anyway, for any JS longer than a couple of lines, as you can debug it once it's in a file, which you can't do when it's inline.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top