Categories | Question details Back To List | ||
putting code in external JS I was wondering if it's possible to put the mygrid code in an external JS file. I already have the necessary JS files loaded in the <head> section and was wondering if doing the same for the code that actually generates the grid would break it or not. My project includes about 10 small grids on a single page which takes about 20 seconds to load. However, during my testing I noticed that if I try to refresh the page before the grids are fully loaded results in a loading error. Would it be possible to block refresh action or something similar until loading is complete? Thanks. Answer posted by Support on Mar 31, 2008 03:46 >>I was wondering if it's possible to put the mygrid code in an external JS file. It must not cause any problem, the only rule - your code must be executed only after dhtmlxgrid.js file loaded >>. Would it be possible to block refresh action or something similar until loading is complete? It not possible to block refresh, but it possible to prevent error messages function myErrorHandler(type, desc, erData){ //custom code can be placed here return false; } dhtmlxError.catchError("LoadXML", myErrorHandler); |