Results 1 to 7 of 7

Thread: IE Flash layer conflict with lightbox

  1. #1
    Join Date
    May 2008
    Posts
    91
    Thanks
    35
    Thanked 0 Times in 0 Posts

    Default IE Flash layer conflict with lightbox

    1) Script Title: Lightbox image viewer 2.03a

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...box2/index.htm

    3) Describe problem: I getting a bug condition in Internet Explorer (fine in Firefox): I currently have a small flash movie running on the same page as
    the lightbox viewer. The image comes up fine with all the effects, but when I click on the background or the X,the flash movie starts when it is not supposed to. Is there a work around for this? Thanks
    Last edited by printman55; 04-06-2010 at 05:33 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Maybe. I'm not aware of anything in general about the lightbox script that would cause this though.

    If you want more help:

    Please post a link to a page on your site that contains the problematic code so we can check it out.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    May 2008
    Posts
    91
    Thanks
    35
    Thanked 0 Times in 0 Posts

    Default

    Here is the site http://www.rspsitedesign.com/test.htm Open in Internet Explorer. Not a problem in Firefox.
    Click on one of the light box icons. After the large image opens, either click the X close image or click the background and you will see the little Flash movie start on the retro TV screen. That Flash content is on a layer that only is supposed to start when you click on the Flash button to the left of the screen.
    Thanks
    Last edited by printman55; 04-06-2010 at 03:52 PM. Reason: better test page

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That really shouldn't be happening. But it obviously is. I think this will fix it - Find this around line 731 in the lightbox.js file:

    Code:
    // ---------------------------------------------------
    
    function showFlash(){
    	var flashObjects = document.getElementsByTagName("object");
    	for (i = 0; i != flashObjects.length; i++) {
    		flashObjects[i].style.visibility = "visible";
    	}
    
    	var flashEmbeds = document.getElementsByTagName("embeds");
    	for (i = 0; i != flashEmbeds.length; i++) {
    		flashEmbeds[i].style.visibility = "visible";
    	}
    }
    
    // ---------------------------------------------------
    Using a text only editor like NotePad, change it to:

    Code:
    // ---------------------------------------------------
    
    function showFlash(){
    	var flashObjects = document.getElementsByTagName("object");
    	for (i = 0; i != flashObjects.length; i++) {
    		flashObjects[i].style.visibility = "";
    	}
    
    	var flashEmbeds = document.getElementsByTagName("embeds");
    	for (i = 0; i != flashEmbeds.length; i++) {
    		flashEmbeds[i].style.visibility = "";
    	}
    }
    
    // ---------------------------------------------------
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    printman55 (04-06-2010)

  6. #5
    Join Date
    May 2008
    Posts
    91
    Thanks
    35
    Thanked 0 Times in 0 Posts

    Default

    John,
    You're the best. Thanks so much for the code change. It now works in both browsers!
    Steve

  7. #6
    Join Date
    May 2008
    Posts
    91
    Thanks
    35
    Thanked 0 Times in 0 Posts

    Default

    One additional thing. Is there a way to add more html in addition to the link or caption? This script would make an awesome pop up.
    Steve

  8. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I think there is. But the modifications and how one would go about it would get complex. There are already other lightbox type scripts out there that allow for more options, find one that suits your needs. One of the best is Lightwindow:

    http://stickmanlabs.com/lightwindow/

    Unfortunately their server is down and has been for a while.

    Lightbox Gone Wild:

    http://particletree.com/features/lightbox-gone-wild/

    can import a page, so it could have just about anything on it you like.

    You can Google each of these terms for other options:

    lightbox

    model window

    lightbox clone


    However, you can use the title attribute of the lightbox version you are using to cram in quite a lot of text, even use rich HTML. The only drawback is that when you hover over the link, you see all that stuff as a tooltip. But this can be avoided by setting the title attribute of the thumbnail image to something else.

    If I was to update lightbox itself though, I'd use the most recent version (2.04 last I checked). I've already modified it for some things. Nothing like you are talking about here though. I have no current plans to do so.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. The Following User Says Thank You to jscheuer1 For This Useful Post:

    printman55 (04-06-2010)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •