PDA

View Full Version : Simple Controls Gallery and Safari



judeabb
01-10-2009, 09:45 PM
1) Script Title: Simple Controls Gallery

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex4/simplegallery.htm

3) Describe problem: This script is fantastic, I love it, but for some reason it makes Safari quit unexpectedly whenever I try to open the page where I am using it:
http://www.corinnesilva.com/new/slide.php

Is there a fix for this. The person I'm doing the website for is a Safari user (obviously!)

Any help greatly appreciated.

Jude x

ddadmin
01-11-2009, 07:54 AM
Does this happen on the DD demo page for you as well? Using Safari 3.x Win to test your page btw, I don't see any issues.

judeabb
01-11-2009, 10:02 AM
Oh my goodness, yes it does!
I'm using Safari Version 2.0.4 (419.3) on a Mac.
I'll get some other Safari users to test the link and see if it's the same for them.

Thanks.

Jude x

ddadmin
01-11-2009, 12:08 PM
Hmm I don't have access to a Mac unfortunately, so it's hard for me to debug for it. Aren't most Mac users on Safari 3.x as well?

jscheuer1
01-13-2009, 03:28 PM
I can't test Safari 2.x either, for the same reason. But are you getting anything in the error log or whatever Safari 2 has that might give us a clue as to the problem?

This might tell us something - turn off javascript in Safari 2 and view the pages (yours and the one on Dynamic Drive), do they both still crash?

If so, it would probably be the css of the Gallery, not the script itself.

One thing that Safari 2 might be choking on is jQuery itself, or perhaps just the pack(ed) version of it. Try it with the uncompressed version:

http://code.google.com/p/jqueryjs/downloads/detail?name=jquery-1.2.6.js&can=2&q=

ddadmin
01-13-2009, 07:21 PM
I suspect it might be jQuery itself Safari 2 is choking on as well. This since in another thread someone had mentioned another jQuery based script on DD unexpectedly closing in Safari for him/her. Anyhow, without access to a Mac, one can only speculate based on info provided by someone who does. :)

judeabb
01-14-2009, 10:39 AM
Thanks for that useful information. I can report that with javascript turned off in Safari the pages load and Safari doesn't crash.
I replaced the packed version of jQuery with the uncompressd one but am still getting the same problem.

jscheuer1
01-14-2009, 10:51 AM
To test if it is just JQuery, the next step would be to try a page with javascript on, but no Gallery script. Just put the the jQuery script tag in the head of the page.

If it still crashes, it is incompatible with jQuery itself. Even if it doesn't, it may still be incompatible with jQuery, but if it does crash - then there is no question about it.

judeabb
01-14-2009, 01:57 PM
I did that and it doesn't crash with the jQuery script in and with the Simplegallery script removed.
What can we deduce from this - that it's the Simplegallery script?

I appreciate all your detective work!

jscheuer1
01-14-2009, 02:24 PM
No. All this tells us is that it is either the gallery script alone, or the gallery script and jQuery in combination. Without the gallery or some other script, jQuery itself doesn't do a lot of stuff. It just more or less sits there waiting for commands.

jscheuer1
01-14-2009, 02:30 PM
See:

http://groups.google.com/group/jquery-en/browse_thread/thread/a341aea0b9a56678

If that information is correct, best to skip jQuery and any involved javascript in Safari 2.

ddadmin
01-15-2009, 12:45 AM
Very interesting info John that you dug up. It seems jQuery at its core does work in Safari 2.x, but as soon as you try to do anything with it, there's a chance it will crash in Safari 2.x due to "serious memory issues" in the browser, as John Resiq (the creator of jQuery) puts it.

If I had access to a Mac/ Safari 2.x, I may be able to tweak the script to work in Safari 2.x, but the inherent problem seems to be the browser in combination with jQuery in this case, and any future tweaks to the script could result in it not working in Safari 2.x once again. Not really a sustainable solution.

ddadmin
01-15-2009, 08:52 AM
jQuery 1.3 (http://docs.jquery.com/Release:jQuery_1.3) has been released. One thing worth trying is to try using this version instead with Simple Controls Gallery, and see if it helps with the Safari 2.x issue. Just follow the directions near the end of the blog post cited in my link.

judeabb
01-15-2009, 09:48 AM
It works! jQuery1.3 works fine in Safari 2.0.4
I can't even begin to express my gratitude. I'm so happy. Thank you!

Jude xx

judeabb
01-15-2009, 09:57 AM
Sorry - got ahead of myself! It worked once - and now it doesn't. But ... if I just put the the jQuery script tag in the head of the page it's fine. Does that help at all?

Jude x

ddadmin
01-15-2009, 09:59 AM
Sorry - got ahead of myself! It worked once - and now it doesn't. But ... if I just put the the jQuery script tag in the head of the page it's fine. Does that help at all?

Jude x

What do you mean by the jQuery script tag? Do you mean the code:


<script type="text/javascript" src="jquery-1.x.x.pack.js"></script>

By default it should go in the HEAD section of your page already.

judeabb
01-15-2009, 10:26 AM
Ye sorry - wasn't being clear. I meant putting <script type="text/javascript" src="jquery-1.x.x.pack.js"></script> in the head, but not putting the Simplegalery script tag in.

Jude x

ddadmin
01-15-2009, 11:09 AM
So basically the new v1.3 jQuery version doesn't change anything for you, since even with the older v1.26, you had said just embedding it in the HEAD section of your page doesn't cause Safari 2.x to crash, but putting Simple Gallery in does. In other words, there are no differences so far when using the newer version of jQuery compared to the older?

judeabb
01-15-2009, 12:34 PM
Correct!

jscheuer1
01-15-2009, 01:57 PM
Sounds like a case where Safari 2 just cannot handle the memory load required by any complex script.