I found a bug in jqGrid 3.7.2. While using jqGrid in debugging mode using grid.loader.js in IE8, IE8 does not load all the require files. It also requires ajax call like Safari.
I think that this should work, because there is no problem in my IE8 (in I7 mode it works ok too)
You are the first one that reported this problem, but as I say – "Ende gut – alles gut"
Kind Regards
Tony
Somehow, my IE8 does not run properly. When I write the url and hit enter, it works fine but when I press refresh (or F5), it crashes!
Regards,
Archan
Hi Archan,
Did you ever figure out how or why it was doing this? As I am also having the same problem, I am starting a new jqGrid from scratch to test another issue i'm having but I'm getting this issue here but with the 3.8 version. Only in IE compatibility mode and IE 8 so far.
I think that this should work, because there is no problem in my IE8 (in I7 mode it works ok too)
You are the first one that reported this problem, but as I say – "Ende gut – alles gut"
Kind Regards
Tony
Somehow, my IE8 does not run properly. When I write the url and hit enter, it works fine but when I press refresh (or F5), it crashes!
Regards,
Archan
Hi Archan,
Did you ever figure out how or why it was doing this? As I am also having the same problem, I am starting a new jqGrid from scratch to test another issue i'm having but I'm getting this issue here but with the 3.8 version. Only in IE compatibility mode and IE 8 so far.
I did not try with 3.8 in debug mode, butyou can tweak with the same code as I metioned above which works fine in IE (any mode).
I have the same problem… Works fine in FF but in IE when i hit refresh button on browser or hit F5 the grid doesn't work fine, but if i press enter in the url address bar the grid works fine….
Sorry, but the code looks like a recycle bin in which you place one CSS of JS file after another. You define a function, then overwrite it many times and you wish that all should work at the end?
One more problem: you load http://parkcars.info/media/icm…..lts.1.1.js after the http://parkcars.info/media/icm……loader.js, but it run before the files from grid.loader.js will be executed. I suggest that you place the code from jqgrid.defaults.1.1.js inside the
(function ($) { // place you code here })(jQuery);
(or inside of jQuery(document).ready(function () {/*place the code here*/});). Then you can be sure that you code like jQuery.extend(jQuery.jgrid.defaults, { /*…*/}) work after the jqGrid are loaded.
First of all you should produce clear code and then one can make the code working in all web browsers.
first of all the last modification which you made (function ($) {/*code here*/})(jQuery); is not correct. It was my error in my previous post. One should use
$(function() {/*code here*/});
or another more readable form
$(document).ready(function () {/*code here*/});
which wait for the document is loaded. The function (function ($) {/*code here*/})(jQuery); just redefines $ as jQuery and is helpful in case of usage of different JavaScripts libraries where $ is also defined.
Now about the last version of your code. If you verify your test page with validator.w3.org you will see 21 errors. After some changes in your code I eliminated the errors and could reproduce your problem. I see the problem as a bug in the grid.loader.js. The problem is that with the current version of grid.loader.js the JavaScript files which belongs to jqGrid will be loaded parallel and executed in the order in which the load process are completed and not in the order in which the files are started be loaded. So depend on many undeterministic reasons the execution order of the JavaScript files could be wrong. The problem and the corresponding solution is described here. So I made a fix in the grid.loader.js (see results here).
After all the modified version of your page work in all browsers in which I tested it (last versions or Firefox, Opera, Safari, IE9 beta, IE8):
// This file should be used if you want to debug function jqGridInclude() { var pathtojsfiles = "/jqGrid/jquery.jqGrid-3.8.2/src/"; // need to be ajusted // set include to false if you do not want some modules to be included var modules = [ { include: true, incfile:'i18n/grid.locale-en.js'}, // jqGrid translation { include: true, incfile:'grid.base.js'}, // jqGrid base { include: true, incfile:'grid.common.js'}, // jqGrid common for editing { include: true, incfile:'grid.formedit.js'}, // jqGrid Form editing { include: true, incfile:'grid.inlinedit.js'}, // jqGrid inline editing { include: true, incfile:'grid.celledit.js'}, // jqGrid cell editing { include: true, incfile:'grid.subgrid.js'}, //jqGrid subgrid { include: true, incfile:'grid.treegrid.js'}, //jqGrid treegrid { include: true, incfile:'grid.custom.js'}, //jqGrid custom { include: true, incfile:'grid.postext.js'}, //jqGrid postext { include: true, incfile:'grid.tbltogrid.js'}, //jqGrid table to grid { include: true, incfile:'grid.setcolumns.js'}, //jqGrid setcolumns { include: true, incfile:'grid.import.js'}, //jqGrid import { include: true, incfile:'grid.grouping.js'}, //jqGrid grouping { include: true, incfile:'jquery.fmatter.js'}, //jqGrid formater { include: true, incfile:'JsonXml.js'}, //xmljson utils { include: true, incfile:'jquery.searchFilter.js'} // search Plugin ]; var filename; for(var i=0;i<modules.length; i++) { if(modules[i].include === true) { filename = pathtojsfiles+modules[i].incfile; document.writeln("<script type='text/javascript' src='"+filename+"'></script>"); } } }; jqGridInclude();
I hope Tony will read the answer and will fix grid.loader.js of https://github.com/tonytomov/jqGrid. If he don't write his comment here in the next week I will open a separate bug report.
The only disadvantage which I could find in the usage of document.writeln technique is that it is not work for XML files (XHTML files which hat additional line <?xml version="1.0″ encoding="utf-8″?> at the beginning). It is seldom used, but it is used.
So in my opinion the most pragmatical solution would be to publish uncompressed version jquery.jqGrid-3.8.3.js file which will be contain all uncompressed files from which consist jqGrid (like I suggested you before someone). If you continue to include grid.loader.js, then at least for Internet Explorer it should be fixed to use document.writeln technique.