Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Cesar on Nov 19, 2007 06:04
open dhtmlx forum
JS error in IE6 (FireFox work fine)

Hi,

my dhtmlgrid give an error when I try to use from IE6. Error is about "align" property. From FF there is not problem, I look in javascript´s console and all I see was a warning about 'filter' property in the dhtmlxgrid.css. The OnLoad function seems like:

    function doOnLoad(){
            mygrid = new dhtmlXGridObject('gridbox');
             mygrid.setImagePath("../ajax/codebase/imgs/");
            //set columns properties
            mygrid.setHeader("P,ID_contrato,Dominio,Producto,Tipo Hw,Modelo,Numero de serie,ubicación,Ip gestion,Observaciones" );
            mygrid.setColTypes("link,ro,ro,ro,coro,ed,ed,ed,ed,ed");
mygrid.setInitWidths("40,75,200,125,75,200,125,75,100,250");
            mygrid.setColAlign("center,left,left,left,left,left,left,left,rigth,left");
mygrid.setColSorting("str,int,str,str,str,str,str,str,str,str");
mygrid.enableBuffering(500);
mygrid.init();
//set grid event handlers
            mygrid.setOnEditCellHandler(doOnCellEdit);
            //populte combobox with values
            populateCombo();
//load grid content
             mygrid.loadXML("../ajax/codebase/exhw.xml");
            //set loaders
            rowUpdater = new dtmlXMLLoaderObject(doUpdateRow,window);
            rowEraser = new dtmlXMLLoaderObject(doDeleteRow,window);
        }


For test I used this XML:

<?xml version="1.0" encoding="iso-8859-1"?>
<rows><row class="ev_row" id="125"><cell><a href="javascript:addNewRow(125);"><img border="0" src="../ajax/imgs/add.png"/></a> <a href="javascript:deleteRow(125);"><img border="0" src="../ajax/imgs/borrar.gif"/></a></cell><cell>220274</cell><cell>cnic.dedi.acens.net</cell><cell>DE-UNXB</cell><cell>dedicado</cell><cell>IBM-305</cell><cell>550242T</cell><cell>P:2 F:3 R:6</cell><cell>217.116.2.228</cell><cell>-</cell></row></rows>


Thx.
Answer posted on Nov 19, 2007 07:06
>>was a warning about 'filter' property in the dhtmlxgrid.css
this is normal, FF shows such data for any css style which it not support.

Problem caused by type in setColAlign command
You have
mygrid.setColAlign("center,left,left,left,left,left,left,left,rigth,left");
while correct is
mygrid.setColAlign("center,left,left,left,left,left,left,left,right,left");

IE, somehow, is strict to attributes, which used directly against HTML