Shadowbox + existing flash embedded in page breaks in Firefox 2

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Shadowbox + existing flash embedded in page breaks in Firefox 2

headchem
Hey all, I have a problem on this page:

http://www.elon.edu/campaign/test2.html

I'm using javascript to dynamically insert a flash movie at the top of the page, but the flash movie does not appear in FF1.5 or FF2.  I have a video scroller widget at the bottom that uses shadowbox to popup the videos.  The page behaves as expected in IE6, IE7, FF3, and Safari.  I've isolated the problem down to the following line in default2.js:

Shadowbox.init(options);

With that line removed the main video will appear normally.  Why does calling "Shadowbox.init(options);" make all other flash on the page disappear?

Thanks for your help!
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox + existing flash embedded in page breaks in Firefox 2

Wizzud
In this post ... http://www.nabble.com/No-Cursor-in-FF2-When-Including-js-files.-to18320667.html#a18358238 ... there is a possible solution for a missing cursor if FF2.

It occurred to me that your problem might possibly have the same solution, so would you mind trying it out?

Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox + existing flash embedded in page breaks in Firefox 2

headchem
Hi Wizzud, your linked post helped me a lot!  I took your idea and put it into jQuery code so I wouldn't have to modify the original shadowbox.js file:

$(document).ready(function() {
    $("#shadowbox_container").css("display","none");
    $("#shadowbox_overlay, #shadowbox_nav_close").click(function(){
        $("#shadowbox_container").css("display","none");
    });
});

And the following snippet is called every time I dynamically load the videos in my video widget:

Shadowbox.setup($("a[rel^=shadowbox]"));
$(".sb_link").click(function(){
    $("#shadowbox_container").css("display","block");
});

Now everything works great in all* browsers!  *Except IE7...  If you go to http://www.elon.edu/campaign/test.html in IE7 (note this is a new url from the previous one), and click one of the thumbnail videos in the widget at the bottom of the page, the shadowbox popup appears almost off screen, and the grey background only covers a portion of the window.  I believe this is a separate problem from my original post that I only just now noticed.  Any ideas before I start adding IE-only css hacks?

Thanks again for you help.
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox + existing flash embedded in page breaks in Firefox 2

Wizzud
Give your page a valid doctype!
Combine literacy with curiosity and a whole world of information opens up to you
Reply | Threaded
Open this post in threaded view
|

Re: Shadowbox + existing flash embedded in page breaks in Firefox 2

headchem
Doh! I got lazy with my test page.  Adding a doctype fixed everything.  Thanks for your help!