View Full Version : Different JS files for different functionalities

2 Apr 2008, 11:48 AM
I was able to create a form with some tabs and a grid. m happy but my JS file has become 26kb i.e 800 lines. It does not fall under our coding standards. I guess there should be a way to separate the js files, may be Data.js, fields.js, Layouts.js and functions.js. can this be done?

2 Apr 2008, 2:07 PM
Of course it can be done. Just break the file into smaller logical parts and include each of those in the HTML page that's calling it.

One thing that you might want to suggest though is a change to your coding standards. As much as I can understand that they want to keep things as small as possible, making multiple calls to get multiple JS files is always going to be slower then having one JS file with all the same info in it, regardless of how big that single file is.