Categories | Question details Back To List | ||
Crash of IE while loading a grid (?) Hi, I have a HTML page working correctly on some server (windows server 2003, Apache2, IE7), but I have some unpredictable behaviour on a other one which is supposed to be quite similar. In the worse case, it gives a crash of IE, or at least a blank page. I've tried to create a more simple page with only one functionnality in order to test if it was working or not, using a dhtmlxGrid (pro); here is the code: " grid_trial = new dhtmlXGridObject('grid_trial'); grid_trial.setImagePath( (img_path + "/grid/imgs/") ); grid_trial.setHeader(["","","<div class='div_custom_header'>Studies</div>","<div class='div_custom_header'>Description</div>","<div class='div_custom_header' style='width:220px'>Clinical plan</div>","<div class='div_custom_header' style='width:80px;'>Phase</div>", "<div class='div_custom_header' style='width:140px;'>Indication</div>", "<div class='div_custom_header'>Initials</div>","",""], ["text-align:center;vertical-align:middle;"]); grid_trial.setInitWidths("0,65,140,245,245,85,140,65,0,0"); grid_trial.setColAlign("left,center,left,left,left,left,left,left,left,left"); grid_trial.setSkin("light"); grid_trial.enableRowsHover(true,'grid_hover'); grid_trial.setColSorting("int,int,str,str,str,str,str,str,str,str"); grid_trial.setColTypes("ro,ch,ro,ro,ro,ro,ro,ro,ro,ro"); grid_trial.attachHeader(["...some code..."],["...some code..."]); grid_trial.attachEvent("onXLE", function(grid) { grid_trial.sortRows(2, "str", "asc"); }); grid_trial.enableSmartRendering(true,50); grid_trial.init(); grid_trial.attachFooter(["...some code..."],["...some code..."]); try { grid_trial.load("some_url" , "json"); } catch(err) { //etc... } " It seems that the crash happens will the grid is loading, as I can see the page with the empty grid just before it crashs down. No error in apache logs ... Answer posted by Support on Mar 30, 2009 06:09 >>grid_trial.setHeader( The array of style must be a 3rd parameter not the 2nd ...,"",""], null,["text-align:center;vertical-align:middle;"]); It must not cause IE crash, but still. The problem may be caused by some specific data in JSON output. Component uses eval to convert json string to the object, so technically it executes received javascript code and while it must be safe in theory, it pretty possible that some invalid syntax inside JSON data can kill IE. If issue still occurs for you - please provide a sample of json data which loaded in problematic case ( you can send it directly to support@dhtmlx.com ) Answer posted by Sunchaser on Mar 30, 2009 11:15 Hi, Thanks for the information about the array of style, I'll change the code. So, I'm gonna ask my boss, in order to see with him if I can send you the json file, just because there are some "private" datas inside that are not supposed to go outside; but, thanks for this proposal, if ok from him I'll send the file directly to support. However, I can use an other format instead of json, no problem, is XML better ? Answer posted on Mar 31, 2009 03:46 >> I can use an other format instead of json, no problem, is XML better ? The XML was an original data format, so it supports all features of grid ( some of which can't be used from JSON ) Because most time consuming part is HTML rendering , both XML and JSON provides nearly the same loading performance Answer posted by Sunchaser on Apr 01, 2009 14:39 The problem is still here. Here is the last 3 lines in the apache (apache2) access log just before the last crash: " 10.2.74.221 - - [01/Apr/2009:21:35:51 +0200] "GET /sbx/CSI/grid/json_ctry.js?a_dhx_rSeed=1238614550472 HTTP/1.1" 200 33229 " Now, each time there is a crash, I can see that the last lines in the access log of apache are these lines. There is nothing particular in the error log. The 3 files are used by 3 grids with the "load(...)" method. As these files are called in the same second, is it possible that some other code is trying to be executed before the grids are loaded and could cause a conflict and then a crash ? The grids are supposed to be attached to cells of accordion; is it possible that they are attached before the loading is finish and that it could cause a crash ? (I should test and put some flags in order to be sure that the grids are loaded, and then attached to cells ?) Thanks. |