Prob w/ DD_belatedPNG

Page: 1

Author Post
flyingpylon
Guest
Allow me to preface this by saying that I am no javascript whiz... however, I seem to be having a problem with Floatbox in IE6.

I have an anchor tag which is NOT Floatboxed, that uses onClick to call a function that simply changes the display property of a div from "none" to "inline". That's it.

Floatbox seems to work fine if I refresh the page and use it before the aforementioned link. But if I click that link first, and then try to click a link that IS Floatboxed, Floatbox does not appear, and I get a javascript error that says:

DD_belatedPNG.ready is null or not an object

I turned off shadows thinking that might help (and I already have rounded corners turned off) but that didn't make a difference.

Of course this problem does not appear with "real" browsers, but I'd like to get it working in IE6 if I can.

Any ideas? Thanks.
Administrator
Registered: Aug 2008
Posts: 3382
I can't reproduce this. I set up a page doing as you described and floatbox keeps working fine for IE6. This means, if you are willing, I'll need to engage some of your time to track this down.

First, do you have an online link where I can see this behaviour and poke around to see what might be the cause?

Also, I wouldn't mind if you would try the following line replacement in floatbox/modules/core.js. Four lines into the code find the line:
if (t.ieOld && !DD_belatedPNG.ready) return t.setTimeout('start', function() { t.start(anchor); }, 50);

and replace it with:
if (t.ieOld && !(DD_belatedPNG && DD_belatedPNG.ready)) return t.setTimeout('start', function() { t.start(anchor); }, 50);


If that change fixes the problem, could you please turn shadows back on and see if they are rendering ok.

Finally, if we haven't found any joy with either me poking through your online page or you making that code change, we would need to get an online page, point your floatbox include lines to the files on my test server, and let me spend some time probing into the details of the behaviour.

Let me know if you want to proceed with any of this.

Oh, and by the way, you don't need to turn off round corners for IE6's benefit. IE6 can't render those corners correctly so round corners are always turned off by floatbox for all IE6 browsers.
flyingpylon
Guest
I appreciate your efforts. I tried replacing the line you mentioned and that removes the javascript error, but nothing else happens (the floatbox doesn't load).

I only turned off rounded corners because I didn't really want them for this particular site. I didn't really need shadows either (the background is black anyway).

It may be a day or so before I can look into this some more, but I will get back to you. I have some other scripts running on that page which have not shown any conflicts previously, but perhaps that has something to do with it. Specifically, I have wz_tooltip, snapshots, yahoo media player, and Google Analytics. But again, unless I call my little display script, Floatbox works fine.
flyingpylon
Guest
Okay, after some more testing, I've found the problem. And you'll be happy to hear that it was my mistake and not anything wrong with Floatbox.

Very simple... I had "javascript:" in the href attribute of my anchor tag that displayed the hidden but not floatboxed div. Once I changed that to "#" everything seems to work fine. I realize now that this is an issue with IE6 and has nothing to do with Floatbox.

Doh!! :roll:

Thanks for your prompt attention anyway.

Page: 1