views:

555

answers:

1

I have a Javascript image switcher on my products page. It working perfect in IE and Firefox but both Safari and Chrome fails to load the script on some pageloads. A refresh seems to fix it but when changing product page or language it crashes.

The product page

Im using Wordpress and the script is varal.org/media/imageswitcher/

Thanks! Anton

A: 

I did not experience any issues in either Chrome or Safari for Windows on your product page. Try this in Chrome, to check if the two scripts (imageswitcherconf.js and imageswitcher.js) are being loaded:

  1. Press Ctrl+Shift+J to open the JavaScript Console/Developer Tools window.
  2. Click the Resources tab on the top of the window.
  3. Enable resource tracking/script debugging if you have to.
  4. With the JavaScript Console/Developer Tools window still open, perform an operation that would normally trigger a crash, such as switching languages.
  5. On the left side of the window, under the Resources heading, you should see imageswitcherconf.js followed by imageswitcher.js. (For me, they appeared fourth and fifth in the list, respectively.)

If the files aren't being loaded:

  • Are you behind a caching proxy?
  • Is your browser cache clear?
Christopher Parker
Thanks for the reply.I'm clearing the cache and I do not use a proxy. Whit resource tracking on I don't seem to get any failures. imageswitcher.js is showing up almost last thought. A friend running XP is also getting the same issues.
Kidrow
Is imageswitcher.js being loaded before imageswitcherconf.js?
Christopher Parker
Also... Does this happen to you at http://varal.org/media/imageswitcher/?
Christopher Parker
It does not happen on varal.orgThe page loads: html, css, imageswitcher.js, imageswitcherconf.js, 960.css, reset.css and so on.
Kidrow
The issues is still there whit the standard config and I also tried removing preload without success. Might need to try another image switcher. Hard to find good ones though, love the _thumb prefix Varal has. Thanks
Kidrow
If you still want to try the Varal image switcher, there are still some things you can try.You said the image switcher crashes. How? What is the error you receive in Chrome's/Safari's JavaScript Console?Have you tried creating a standalone version of your board image switcher, without WordPress wrapped around it? This will help determine if WordPress is causing the problem somehow.
Christopher Parker
There is no errors. I created a simple page using the scripts and images from the wordpress site and it's working perfect. Every computer I have tested is getting the crashes, just click around on the product page for a while.
Kidrow
I made the assumption that by "crashes", you were referring to JavaScript errors. Are you saying the browser itself stops responding?
Christopher Parker
Here's what I've just done with Chrome 3.0 on Windows XP SP3 English: 1. Click the three different board thumbnails a couple dozen times. 2. Click Svenska on the top right corner of the page. The page reloads. 3. See step 1. 4. Click English. The page reloads again. 5. Repeat from the top. I did this for two minutes straight with no hanging, freezing, or errors. If there's a visual element to this crashing that would help diagnose the problem, could you please take a screenshot and link to it here?
Christopher Parker
Oh, I had already fixed it two days ago. Sorry for not updating here! The solution was wrapping the <script> tag's whit a php "cache javascript" function. I guess it delays the load a little and gets chrome and safari to focus on it more, or something. anyways, thanks for you time and help Christopher!
Kidrow