Avatar of bogartusmaximus
bogartusmaximus
Flag for United States of America asked on

ExtJS datagrid empty data

I have an ExtJS datagrid that works fine in chrome and firefox, but is showing as empty in IE8.  IE is necessary as this is a corporate environment and all of our 3rd party software and websites work in IE and not in the other browsers. The browser war doesn't really matter to me as long as this code can be fixed.  Here is what I am doing:

The code I'm using goes as follows:

Ext.onReady(function(){

  var dstore = new Ext.data.JsonStore({
url: '/loads.json',
root: 'Loads',
fields: ['PO_NUMBER','ORIGIN','FROM_DATE','DESTINATION','TO_DATE','TRACKLINE','TRAILER','REF_NUMBER','FILENAME'],
mode: 'local',
autoLoad: true
});

  var grid = new Ext.grid.GridPanel({
      store: dstore,
      columns: [
{id: 'PO_NUMBER', header: "PO/BOL #", width: 60,  sortable: true, dataIndex: 'PO_NUMBER'},
{id: 'ORIGIN', header: "Origin City", width: 120, sortable: true, dataIndex: 'ORIGIN'},
{id: 'FROM_DATE', header: "Ship Date", width: 75, sortable: true, dataIndex: 'FROM_DATE'},
{id: 'DESTINATION', header: "Dest. City", width: 120, sortable: true, dataIndex: 'DESTINATION'},
{id: 'TO_DATE', header: "Date Del.", width: 75, sortable: true, dataIndex: 'TO_DATE'},
{id: 'TRACKLINE', header: "Status", width: 200, dataIndex: 'TRACKLINE', renderer: status},
{id: 'TRAILER', header: "Trailer #", width: 50, dataIndex: 'TRAILER'},
{id: 'REF_NUMBER', header: "IGBL #", width: 50,  sortable: true, dataIndex: 'REF_NUMBER'},
{id: 'PODs', header: "PODs", width: 100, sortable: false, dataIndex: 'FILENAME'}
],
stripeRows: true,
autoExpandColumn: 'PODs',
height: 400,
width: 1000,
title:'Loads'
});

      // example of custom renderer function
    function status(val){
        if ( val.match("Delivered")) {
            return '<span style="color:green;">' + val + '</span>';
        }else if( val.match("Enroute")) {
            return '<span style="color:red;">' + val + '</span>';
        }
        return val;
    }



    grid.render('grid-example');
});

the JSON out looks like this:

{ "Loads": [ { "PO_NUMBER": "29302(17 PLTS) ", "ORIGIN": "EL PASO, TX", "DESTINATION": "COMMERCE, CA", "TRAILER": "", "TRACKLINE": "", "REF_NUMBER": "28222", "FROM_DATE": "02/18/2010", "TO_DATE": "02/19/2010", "FILENAME": "" }, ], "Total": "1" }


  It works great in chrome 4 and firefox 3.5, but not in IE8 (i have not tested any other versions of IE).  I have tried using mode 'local' and 'remote' with a relative url and an absolute url.  The only thing I can think of is IE8 has some sort of cross site forgery protection that i don't know how to disable.  I am using ExtJS 3.1 and have added the site to IE8's trusted site list in the Security tab under options.  I am using drupal 6 to generate the JSON code.  Any help would be greatly appreciated, I hope this is just a simple oversight on my part.  Thank you.


JavaScriptDrupal

Avatar of undefined
Last Comment
bogartusmaximus

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
bogartusmaximus

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck