It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Cross-platform issues

Cross-platform issues

Postby paquito on Thu Jan 14, 2010 12:25 pm

Hi,

I've a photo gallery with a navigation panel made of little buttons with numbers which, after clicking on them, load the relative photo on the right hand side.

This is the page: http://www.newtreedesign.co.uk/test/douglas/_test.html

When a number from the navigation panel is clicked, it should turn purple.

It all works fine in safari/mac latest versions but there are problems under IE/Win and FireFox/Win, the other 2 environments I'm keen to have compatibility.

Could please anyone suggest me what corrections I've to make on the code in order to be sure I've this compatibility issues sorted?

Thank you
paquito
paquito
 
Posts: 1
Joined: Thu Jan 14, 2010 12:24 pm

Re: Cross-platform issues

Postby harrierdh on Thu Jan 14, 2010 3:34 pm

I tried it in IE6 and FF3.5. It worked the first time in FF. However, in IE it did not work the first time, but then started working. This makes me think that you are not getting your images preloaded before the page displays. I would move the script from inside the body to the <head> area. That way you'll be sure the script runs before the page displays.

That's just a guess though. The code looks fine. To my knowledge what you are trying to do should work cross browser.

The only other thing I would do, if it were my code, is give your img tags an id attribute. Then rather than coding it as "thumb.src=path" try "document.getElementById(thumb.id).src=path".
harrierdh
50+ Club
 
Posts: 51
Joined: Wed Dec 16, 2009 7:04 pm


Who is online

Users browsing this forum: No registered users and 5 guests