Skip to content

Greybox and Firefox Back Button Issue

August 11, 2008

I started using Greybox for one of my web projects recently.  I like it because it’s a little different that plain old lightbox.

BUT, there was a problem.  In Firefox, after viewing a image and closing it, the back button would no longer work.  The workaround was found by Jani at http://amix.dk/blog/viewEntry/19039

Hello,
Regarding the issue with the back button in Firefox, i think i found a solution.
First i came with this suggestion:
http://efrtw.spaces.live.com/Blog/cns!68A490680B58FBDC!139.entry

I did tweak the script a bit more, and now it seems to work fine in firefox.
Here is the new script for version 5.53:

http://myfreefilehosting.com/f/aeaad9cb1c_0.01MB

The new gb_scripts.js file worked great!

Advertisement
7 Comments leave one →
  1. Dziureq permalink
    August 21, 2008 4:24 am

    Can you explain a bit what further modifications did you make? I am asking because I use modified greybox (from Russ’ Dev Space blog) and ‘Back button’ works now but after watching gallery on page I need to hit ‘Back button ‘ as many times as many images I watched to go back to ‘page-before-page-with-gallery.
    Is there a chance that your modifications fixed this isse? :>
    Regards

  2. Dziureq permalink
    August 21, 2008 4:30 am

    And another thing: download link to Your version of GreyBox isn’t working.

  3. joelthecoder permalink*
    August 21, 2008 9:25 am

    Dziureq,

    The broken link should be:

    http://myfreefilehosting.com/f/aeaad9cb1c_0.01MB

    Sorry about that!

    I didn’t do any of the modifications myself, I just used the one from this download. But doing a diff on the original and this one, I noticed that there were just some added checks to see which browser (IE or firefox) is being used. If it’s firefox, then the script just hides the iframe instead of removing it from the document.

    It addition to this, I did change the line

    this.overlay_click_close=false;

    to

    this.overlay_click_close=true;

    So that the image popup will disappear when the user clicks outside of the image. Otherwise, the user always has to click on the “X” to close it.

    I hope this helps, let me know if somethings unclear.

    -Joel

  4. User permalink
    August 26, 2008 8:28 pm

    When I use that script, my IE7 still shows the image on top of the page even though the main popup window is closed.

  5. September 9, 2008 6:39 am

    Glad that the modified script helped you, and thanks for the addition.

  6. asdrubale permalink
    March 1, 2009 11:23 am

    the link doesn’t work. can anyone post it again?

  7. asdrubale permalink
    March 2, 2009 9:32 am

    Yes it works in an acceptable way.
    You can download it here:
    http://www.megaupload.com/?d=HL0E7W7R

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.