Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Expand a facebox/Lightbox outside an iFrame...

  1. #1
    Join Date
    Apr 2009
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Expand a facebox/Lightbox outside an iFrame...

    1) Script Title: FaceBox

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

    3) Describe problem:

    First: Hey friends! I am new to this forum, but certanly not to DD!
    I have been using this site for some years, and I must say that I have learned alot from trying messing around with the scripts featured on the site.

    Now, I want to use the Facebox or similar script to make pictures pop-up from an iFrame. My problem is that the iFrame is way smaller than the original imagesize (and the size I wan't the image to be shown).
    So - can I make the Facebox (or lightbox) open these images on top of the page, using the space outside the iFrame as well?


    I hope i made myself understandable )
    (I'm from Denmark, by the way)

    KEEP DD ALIVE ()
    Last edited by Snookerman; 05-10-2009 at 12:42 PM. Reason: added “Resolved” prefix

  2. #2
    Join Date
    Apr 2009
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    hmmmmm... Is it an impossible question?

  3. #3
    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

    - John
    ________________________

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

  4. #4
    Join Date
    Apr 2009
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Oh man! Thanks! That one ALMOST hit the spot..
    But... it doesn't seem to work in FF and Safari!?

    Any ideas?

  5. #5
    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

    Do you mean the demo page for it doesn't work in those browsers, or that your implementation of it doesn't? In any case, I believe the author thinks it works in those browsers. Perhaps you are doing something wrong, or there could be a problem with the code I suppose. If the demo page works in those browsers and you want more help:

    Please post a link to the 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

  6. #6
    Join Date
    Apr 2009
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hey John.

    My site is danish, so I hope it'll be understandable:

    www.annikaaakjaer.com/test

    PLEASE NOTE: in the lefthand side menu, you'll spot a TEST link.
    This link opens the picture-site in a iFrame - the lytebox works perfectly in IE,
    and partly also in FF and Safari. It seems to load the script very well, but it seems that the url to the picture isn't working.

    BUT: If I test the htm that contains the thump SOLO in FF and Safari, it all works perfectly.
    So - the error only occurs when FF and Safari loads the htm in the iFrame...

    It's sad, because it works so damn perfect in IE - both 7 and 8.

  7. #7
    Join Date
    Apr 2009
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Any ideas why it doesn't work in Safari and FireFox?

  8. #8
    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

    From what you've said so far, I can only think of two things -

    1. As regards understanding the site, my Danish is weak. If you could tell me what to do - what to click on, in what sequence to see the issue - I might get an idea of what the trouble might be.

    2. A general issue with Lytebox is that the iframe that it is displayed inside of should have a name attribute, ex:

      HTML Code:
      <iframe name="whatever" src="page_with_lytebox.htm"></iframe>
    - John
    ________________________

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

  9. #9
    Join Date
    Apr 2009
    Posts
    39
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default

    Hello.

    I hope this explanation is good:

    On the site www.annikaaakjaer.com/test you will find a TEST link:


    When pressed, the site opens a thump-section in an iFrame with only one thump (for testing):


    In Internet Explore 7 (and 8) the lytebox loads perfectly, and the picture loads as it supposed to. On top of the site, incl. the space outside the iFrame that host the thump. Absolutly no problems there!

    But in both Mozilla FF and Safari the "fade" effect and the picture-frame loads perfectly - but the picture doesn't load at all...

    It clearly works fine, but seems to have problems "finding" the actual picture!?



    A bit of codes:

    In the index.html I have the following line (more lines are added to show possition):

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>

    <link rel="stylesheet" href="lightbox/lytebox.css" type="text/css" media="screen" />
    <title>Annika Aakjær</title>

    ...and in the actual frame containing the thump:

    <script type="text/javascript" language="javascript" src="lytebox.js"></script>
    </head>


    ...and a little piece of code from the index.html:
    <iframe name=target style="width:626px;height:531px" src="mainFrame.htm" allowtransparency="true" frameBorder=0></iframe>

    I can't use the src="name_of_site_with_thump.htm" here, as I don't want the thump-site to be the "splash" site when entering the homepage...

    I don't think it's relevant to post both CSS and JS codes here... I left them pretty much untouched, except for changing the images used for "close" button etc. And these files seem to load perfectly.
    Last edited by Poontang; 05-09-2009 at 08:49 AM.

  10. #10
    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

    It appears to be a path problem. Where you have:

    Code:
    <a href="presse/annika_aakjaer_presse_01.jpg" rel="lytebox" title="Foto: Sofie Amalie Klougart"><img src="presse/01.png" width="84" height="89" border="0"></a>
    on this page:

    Code:
    http://www.annikaaakjaer.com/test/billeder/presse.htm
    The browsers that are having a problem are not finding the path to the image. Perhaps if you made the path absolute, ex:

    Code:
    <a href="http://www.annikaaakjaer.com/test/billeder/presse/annika_aakjaer_presse_01.jpg" rel="lytebox" title="Foto: Sofie Amalie Klougart"><img src="presse/01.png" width="84" height="89" border="0"></a>
    It may work.

    If that takes care of it but you don't understand what an absolute path is, let me know. If there is still a problem even with the path as shown (don't forget to clear the browser's cache before testing the newly uploaded file), let me know that too.
    - John
    ________________________

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

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

    Poontang (05-10-2009)

Tags for this Thread

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
  •