View Full Version : Script problems in IE8, Safari and Chrome

09-09-2011, 11:06 AM
Hello all,

I'm back with more silly newbie questions.

I'm building a website that includes 3 javascript codes:
1. Onmouseover image switch for the nav bar.
2. On a specific page, onmouseover display of hidden divs.
3. Particletree's Dynamic Resolution Dependent Layout script

All three scripts work fine in firefox, but the 2nd script doesn't work in safari and chrome, and the 3rd one doesn't work in safari, chrome and IE(8). Since the 1st one works fine in all browsers, I'm guessing this isn't a problem with my javascript link or anything like that.

The website is:

The specific page that runs the 2nd code is:

My javascript is:

And my default stylesheet is:

(I apologize for possible jibrish- the website is in Hebrew...)

Any help with these two problems would be greatly appreciated!

09-09-2011, 03:02 PM
It's not really script problems, it's more html problems. You've attached the events to the anchor element, which has no height, width, or content. Try adding:


to your anchor elements and you'll see what i mean. It would be better to add this to your div though. But to be real proper look over this too http://www.quirksmode.org/js/events_advanced.html

09-11-2011, 12:50 PM
Thanks! Had to play around with conditional IE comments to make it work, but it looks great now.

Any ideas on solving the second problem, with the browser size script?

09-25-2011, 07:40 PM
Okay, after a few weeks of fiddling about it turns out that the answer is pretty simple -
just add window.onload= changeLayout; to the beginning of the script, and the whole thing works in everything but Safari.

Which of course brings me to my next question- does anyone have an idea how I can get it to work in safari? I ran the script debugger and it showed no errors, so I don't really know what's wrong.