I have started using interactive grid and customizing it using javascript. I have noticed that there is a character limit for the javascript code and as I get past that limit I am getting an error. As a result of that I had to simplify my code and remove all the comments. My question is how can I get around that limitation? Is there a way? Or are there any workarounds?
2 Answers
You could put most of the Javascript code in a function in a .js file and include it into the page (via the page property for Javascript file references), or even put it directly in the page Javascript Function Definitions property if that is big enough. Then call that function from the IG Javascript.
Two options:
First
You can create a function in your page and call it in the IG javascript. Put the code of your function in the field "Function and Global Variable Declaration".
Second
You can create a javascript file and call then in your page. In this case call your javascript file in the field "File URLs". Just put the url generated after you upload the file on Shared Components.
*If this function should be used in many pages of your application, so is better to add this javascript file to your entire application instead of to each page. To do this go to "User Interface" of your application and put the url of your javascript in the field "File URLs" on "Javascript" section.
js
file to the shared components and then referencing it in the Header HTML and when that did not work, I added a script tag with the actual function in the page Header HTML. In both cases got function not defined error. Here is what I used<script src="#APP_IMAGES#Functions.js" type="text/javascript"></script>
– Coding Duchess