PDA

View Full Version : Stockphoto IE6 bug --



efflux
06-01-2008, 03:25 AM
It's not a huge issue, but I'm wondering if anyone has some ideas regarding an Internet Explorer bug in a javascript file on the iStockphoto site.

You'll notice on any search page on iStockphoto (http://istockphoto.com/file_search.php?action=file&text=food) in IE, you will see a brief loading glitch in the upper left corner when you roll over your first image.

It's as if IE is setting the absolute position at 0, 0 the instant the javascript is activated. After it loads up, it starts to work though. Firefox is fine of course.

Here is the javascript file they are using: http://istockphoto.com/cacheserial/1212011559/js/filesearchhover.js

Any fixes for this would be appreciated, I'm trying to emulate the rollover effect they using (only bug-free :) )

jscheuer1
06-01-2008, 12:30 PM
This has now been tested and found to work.

You could try, where it has this:


if (document.getElementById || document.all){
document.write('<div id="trailimageid">');
document.write('</div>');
}

Do it like so:


if (document.getElementById || document.all){
document.write('<div id="trailimageid" style="visibility:hidden;">');
document.write('</div>');
}

And then in the two places where it has:



gettrailobj().left=xcoord+"px"
gettrailobj().top=ycoord+"px"

Make them both:



gettrailobj().left=xcoord+"px"
gettrailobj().top=ycoord+"px"
gettrailobj().visibility='visible'

efflux
06-01-2008, 08:27 PM
You rock! That solution worked perfectly.

I really appreciate your help on this. You should contact iStockphoto and provide them with the solution. Just some more kudos for you and maybe some free credits :)