PDA

View Full Version : IE does not show grit data when loaded remotly



schmidetzki
18 Oct 2006, 10:11 AM
I implemented a grid loading data via ajax and JSONDataModel.
It works fine in FireFox but doesn't show any data in IE (no error messages).

IE even don't show anything exept the headers when I load the data directly:


var schema=...
var data=...
var columns=...
...
this.dataModel = new YAHOO.ext.grid.JSONDataModel(schema);
this.colModel = new YAHOO.ext.grid.DefaultColumnModel(columns);
this.grid = new YAHOO.ext.grid.Grid(id, this.dataModel, this.colModel);
this.grid.render();
this.grid.dataModel.loadData(data);


I checked the page http://www.jackslocum.com/yui/2006/08/31/a-grid-component-for-yahoo-ui-part-2/ with IE and it also don't show any data in the grid.

Mus I have any special settings in IE ?

jack.slocum
18 Oct 2006, 10:22 AM
I just checked that page in IE6 and IE7 and both were fine. What version of IE are you using?

In case you have a stale copy of something, you may want to clear your cache or control+F5.

schmidetzki
18 Oct 2006, 2:16 PM
I just checked that page in IE6 and IE7 and both were fine. What version of IE are you using?

In case you have a stale copy of something, you may want to clear your cache or control+F5.

I am using IE 6.0.290 SP2.
Cleared the cach with no result.
Tried Contrl-F5 with no results.
No data on this grid :?

jack.slocum
18 Oct 2006, 4:20 PM
Can you point me to a link? I'd be happy to look at the code.

schmidetzki
19 Oct 2006, 4:13 AM
Because of that I currently can not send you a link.
I will try to create an sample on our webserver and post a link here.

schmidetzki
19 Oct 2006, 5:48 AM
I solved the Problem: removed one comma from the data definition.

IE showes no data if I write:

var data={'data':[{id: 1, name: 'test',zip: '6666',city: 'Ratingen',country: 'Germany'},]};
this.grid.dataModel.loadData(data);
Firefox however showes the grid data - even if the is one comma too much there.

Both browser show data if I correct the data definition:

var data={'data':[{id: 1, name: 'test',zip: '6666',city: 'Ratingen',country: 'Germany'}]};
this.grid.dataModel.loadData(data);

Because the data was generated on the server, I didn't notice the comma too mutch.
I had to correct the server-script.

jack.slocum
19 Oct 2006, 6:16 AM
You'd be surprised how many people have had that extra comma problem.

jbowman
19 Oct 2006, 6:52 AM
I just found and fixed that in one of my scripts. The one SA still using IE here will be happy :lol: