Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
bugreport : safari reload fails
06/10/2008
13:28
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

in Safari 3. 1.2 on MacOS X 10.5.5, go to the jqGrid sample file :

http://trirand.com/jqgrid/example.html

then hit reload (press Cmd+R) and hte file goes blank. Hit Cmd-Opt-C for console, and you get this bizarre erorr on line 80:

Value undefined (result of expression jQuery("#list2").jqGrid) is not object.

On FireFox3 / Mac this works fine. I'm now downloading Safari Win32 and will repost my findings here.

06/10/2008
13:49
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

the same problem appears on Safari Win32

 but it semes that IExplorer 6.0 won't display the file either

firefox seems to be good on both platforms

06/10/2008
13:51
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Just now I write this from Safari 3 Win. I do not see any error when testing

the demos

I'm sorry, but I do not have Mac to test.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/10/2008
13:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Sorry do not test the link that you write.

Yes there is problem. I will see what is this.

Thank you

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/10/2008
13:57
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

allllllllllllright. After a solid hour of scratching my head, I narrowed down the issue to one single problem : in jquery.jqGrid.js there is a mechanism for automatically adding javascript files to the HTML file that includes jquery.jqGrid.js

well, this one breaks under IExplorer 6 and safari. If I add the needed js files myself, and disable the loop

 for(var i=0;i<modules.length; i++)

everything is swell !

For now, I can continue manually, but I guess it might be usefull for someone to fix this

06/10/2008
14:03
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Maybe this is the problem, but if you open the demos and reloads all

is OK - right?

I will investigate this.

Thank you 

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/10/2008
14:11
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

Yo Tony  !

seemingly this is an old issue with safari :

http://lists.apple.com/archive.....00107.html (this is from 2004 !!!)

this guy did more testing :

http://www.webdeveloper.com/fo.....17817.html

I've done some inspecting, and the js files are properly attached to the head element, so this is NOT the problem. My guess is that the files are indeed added to the DOM, but they are parsed AFTER $(document).ready !!!

06/10/2008
14:22
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

the problem happens in ALL the demos, if you remove them from the tree structure ! This supports my theory : inside the tree, there is no problem with script loading followed immediately by a grid creation !

I did a small test in the exact same example.html : at $(document).ready(), start a 3 sec timer which then invokes the code as it is now inside doc.ready()

guess what ? It works !

So the issue is now narrowed down to : modifying the DOM to insert <script> elements will parse those scripts AFTER document.ready(), which obviously noodles any code inside doc.ready that depends on those scripts

hurray ! We're getting there !

06/10/2008
14:25
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I will try another trick - to append the scripts in div 

Regards

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/10/2008
14:35
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

tony said:

Hello,

I will try another trick - to append the scripts in div 

Regards


hm... i wonder if that will work : the issue is with safari (and IE) modifying the DOM properly, but only parsing the newly inserted scripts after doc.ready(). Must likely this will stay problematic even if those script elements are inserted elsewhere. My guess is that this is actually a document.ready() "bug", not a jqGrid bug ! Well, it's not a bug either i guess, just a problem on how browsers handle this.

I think the solution will be somewhere in this direction :

http://docs.jquery.com/Ajax/jQ......getScript

dynamically load jqGrid in document.ready(). Of course, this is ugly since with jquery we're used NOT to have to init plugins

06/10/2008
14:44
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Maybe a good solution is to add own ready with delay

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

06/10/2008
15:10
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

tony said:

Maybe a good solution is to add own ready with delay


tony said:

Maybe a good solution is to add own ready with delay


I don't know : i'm not such a good jQuery programmer, although i like ot play around with it a lot : - )

by the way : i forgot to compliment you on jqGrid : I like it A LOT and i'm embedding it in our intranet application. I did 3 days of research on JQuery grid plugins, and jqGrid was the best ! 

08/10/2008
02:46
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Finally after lot of testing I found a cross browser solutioin.

Here is the piece of code in jqGrid loader:

....

if (minver !== true) filename = pathtojsfiles+modules[i].incfile;
else filename = pathtojsfiles+modules[i].minfile;
if (combineIntoOne !== true) {
   if(jQuery.browser.safari || jQuery.browser.msie ) {
     jQuery.ajax({url:filename,dataType:'script', async:false, cache: true});
   } else {
      IncludeJavaScript(filename);
   }
} else {
     combinedInclude[combinedInclude.length] = filename;
}

................

Note the ajax call and not getScript

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

08/10/2008
13:44
Avatar
jawadde
Member
Members
Forum Posts: 13
Member Since:
04/10/2008
sp_UserOfflineSmall Offline

cool ! thanks !

I'll download the main jqGrid zipfile again to see how to integrate this, since I'm not really confident about copy-pasting this bit of code into jquery.jqGrid.js myself  (especially the combineIntoOne variable confuses me ðŸ™‚

09/10/2008
02:54
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

At end of week I will publish the bug fix release.

There are also a lot of bugs fixed.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
34 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information