Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






jqGrid 3.7.2 bug with IE8 while using jqGrid debugging

No Tags
UserPost

21:01
12/08/2010


archan.bhatt

Member

posts 19

Hi Tony,


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.

Current code: if(jQuery.browser.safari) {


I changed it to this

if(jQuery.browser.safari || jQuery.browser.msie) {


and it works!


Regards,

Archan Bhatt

22:29
17/08/2010


tony

Sofia, Bulgaria

Moderator

posts 7375

Hello,

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" Smile


Kind Regards

Tony

For professional UI suites for PHP, ASP.NET and ASP.NET MVC visit us at our commercial products site – trirand.net – by the very same guys that created jqGrid.

23:04
17/08/2010


archan.bhatt

Member

posts 19

tony said:

Hello,

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" Smile


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

16:45
12/10/2010


kheang

Member

posts 12

archan.bhatt said:

tony said:

Hello,

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" Smile


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.

17:10
12/10/2010


archan.bhatt

Member

posts 19

kheang said:

archan.bhatt said:

tony said:

Hello,

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" Smile


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).


-Archan

12:33
30/12/2010


paulojsp

Member

posts 6

Hi,

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….

you can see an example in this website:

http://formar.inweb.pt/?com=cu…..isponiveis

if the grid doesn't work fine in IE at start, click on the url and press enter..

can anyone help…

best regards,

Paulo Pinto

01:36
31/12/2010


OlegK

Germany

Member

posts 1210

Hi paulojsp,

On the page http://formar.inweb.pt/?com=cu…..isponiveis you load jqGrid twice: one time as http://formar.inweb.pt/media/i…..rid.min.js and another time as http://formar.inweb.pt/media/i……loader.js. So it is not good example.

Best regards
Oleg

14:16
31/12/2010


paulojsp

Member

posts 6

Hello Oleg,

  Thought jquery.jqGrid.min.js was the main library and the files were uploaded with load.js are the plugins to the library.

So, fix this problem and put a grid on this new page:
http://parkcars.info/?com=teste

The problem keeps on IE.

How can I solve it?

Best Regards,
Paulo Pinto


ps: sorry for my bad english

14:03
02/01/2011


OlegK

Germany

Member

posts 1210


Hello paulojsp,

It is difficult to me to help you because your test page is very very dirty. For example you include the files

http://parkcars.info/templates…../style.css

http://parkcars.info/templates…..rectif.css

http://parkcars.info/templates…..drop_1.css

http://parkcars.info/templates…../front.css

http://parkcars.info/templates…..css/ss.css

http://parkcars.info/templates…../botao.css

http://parkcars.info/templates…..y.tipsy.js

http://parkcars.info/templates…../style.css

which not exist.

Then you load many times different version of jQuery UI (!!!). Here is the load order:

http://parkcars.info/media/icm…..custom.css

http://parkcars.info/media/icm…..tom.min.js

http://parkcars.info/media/icm…..tom.min.js

http://parkcars.info/media/icms/v01/js/jquery-ui-1.8.custom/development-bundle/ui/jquery.ui.widget.js

http://parkcars.info/media/icms/v01/js/jquery-ui-1.8.custom/development-bundle/ui/jquery.ui.datepicker.js

http://parkcars.info/media/icms/v01/js/jquery-ui-1.8.custom/css/overcast/jquery-ui-1.8.custom.css

http://parkcars.info/media/icms/v01/js/jquery-ui-1.8.6.custom/css/overcast/jquery-ui-1.8.6.custom.css

http://parkcars.info/media/icms/v01/js/jquery-ui-1.8.custom/development-bundle/ui/jquery.ui.core.js

http://parkcars.info/media/icms/v01/js/jquery-ui-1.8.custom/development-bundle/ui/i18n/jquery.ui.datepicker-pt-BR.js

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.

Best Regards
Oleg 

11:51
03/01/2011


paulojsp

Member

posts 6

Hi Oleg,

thanks for helping.


Sorry for the dirty code…


I've clean the code, and add the defaults inside the

(function ($) {
    // place you code here
})(jQuery);


The problem keeps on IE.


best Regards,

Paulo Pinto

16:47
03/01/2011


OlegK

Germany

Member

posts 1210

Hi Paulo,

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.

Best regards
Oleg 


17:43
03/01/2011


paulojsp

Member

posts 6

hi Oleg,


it works fine now!Smile


thanks for your help and patience.


Best Regards,


Paulo Pinto

17:47
03/01/2011


archan.bhatt

Member

posts 19

Thanks Oleg for your help.


Archan

22:33
09/01/2011


OlegK

Germany

Member

posts 1210

Hello Tony!

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.

Best regards
Oleg 

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

215


Currently Online:

PrashMon

95 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 10269

Posts: 30347

Membership:

There are 11034 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1210

markw65 – 179

kobruleht – 144

phicarre – 132

YamilBracho – 124

Renso – 118

Administrators: admin (60 Posts)

Moderators: tony (7375 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information