Categories | Question details Back To List | ||
IE8 problem Hi, Because of the new IE8 we are having some problems related with CSS. I know if the users change the browser to compatibily vie the problem will be fix. But I wanted to do this including a metatag to change this in code so the user won't have to change anything. If I include this metatag in my page: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> There is an error in the file dhtmlxgrid.js in the line function dhtmlXGridObject(id) { if (_isIE) try { document.execCommand("BackgroundImageCache", false, true) } catch (e) { }; if (id){if (typeof (id)== 'object'){this.entBox=id this.entBox.id="cgrid2_"+this.uid()}else this.entBox=document.getElementById(id)}else {this.entBox=document.createElement("DIV"); this.entBox.id="cgrid2_"+this.uid()}; this.entBox.innerHTML=""; // ERROR IN THIS LINE THIS.ENTBOX IS UNDEFINED Answer posted by Support on Jul 28, 2009 04:07 Error in mentioned line can occurs because of next reasons a) incorrect ID was provided as parameter of grid's constructor b) you are using some not well formed html element as grid's container In common case , the usage of IE8 meta declaration must not affect js logic of script ( the same code doesn't generate any errors locally ), but you may have need to add the next line before grid initialization, to prevent unwanted css effects. if (_isIE) _isIE = true; //drop IE8 specific flag |