Results 1 to 8 of 8

Thread: Lightbox_plus and IE. . .

  1. #1
    Join Date
    Nov 2008
    Location
    Harstad, Norway
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question Lightbox_plus and IE. . .

    My Lightbox_plus is working very well with Firefox, but using IE it is only showing the loading logo for the first several pictures. Later down the page the loading logo (loading image) doesn't work at all.
    I can't see any differance in the script - so what. . . . ?

    Eni

  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

    Not sure exactly what script you are using. Anyways, what often happens with lightbox type scripts is that as they are used, they incrementally preload the larger images. If that is what's happening here, what that does is eventually reach a point where the loading image (which generally only displays if the larger image isn't cached by the browser yet) no longer gets displayed.

    If 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

  3. #3
    Join Date
    Nov 2008
    Location
    Harstad, Norway
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    Please post a link to the page on your site that contains the problematic code so we can check it out.
    The page in question.

    Thanks,
    Eno

  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

    Looks like an error in coding. However, that might be in conjunction with something fairly unique with your page. But I think it's just an error. Here (in lightbox_plus.js):

    Code:
    	_set_size : function(onResize)
    	{
    		var self = this;
    		if (self._open == -1) return;
    		self._page.update();
    		self._pos.update();
    		var spin = self._wrap.firstChild;
    		if (spin)
    		{
    			var top = (self._page.win.h - spin.height) / 2;
    			//if (self._wrap.style.position == 'absolute') top += self._pos.y;
    			spin.style.top  = [top,'px'].join('');
    			spin.style.left = [(self._page.win.w - spin.width - 30) / 2,'px'].join('');
    		}
    		if (Browser.isWinIE)
    		{
    			self._wrap.style.width  = [self._page.win.w,'px'].join('');
    			self._wrap.style.height = [self._page.win.h,'px'].join('');
    			self._wrap.style.top = [self._pos.y,'px'].join('');
    		}
    		if (onResize) self._set_photo_size();
    	},
    The highlighted line is adding the page's vertical scroll to how far down the page the loading image should be if the overlay is absolutely positioned, which only happens in IE. However, since the loading image is relatively positioned inside the overly which also receives the added scroll as a vertical offset, this doubles the effect pushing the loading image much farther down the page as it is scrolled than seems reasonable. I just commented that line out as shown above in red, seemed to fix it.

    As I say, I'm pretty sure this is an error in coding, perhaps at one time the loading image was separate from the overlay and absolutely positioned, then that line would make sense. But putting it in the overlay is a good move for efficiency in calculating things, if that's what happened, the author simply forgot about this adjustment from before and neglected to get rid of it. It would only show up in IE on pages that were scrolled vertically.
    - 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:

    Enomic (11-16-2008)

  6. #5
    Join Date
    Nov 2008
    Location
    Harstad, Norway
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thank you very much for your help! You had the solution . . . .
    Now it's all working well, in IE too.

    Regards,

    Eno

  7. #6
    Join Date
    Nov 2008
    Location
    Harstad, Norway
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Question

    Quote Originally Posted by Enomic View Post
    Now it's all working well, in IE too.
    Not in the new IE8 ?
    In my newly downloaded IE8 Beta2 it obviously has problem(s). . .?!
    The first pictures open in the big format, but not the next ones.

    Anyone else who has experience with IE8 and Lightbox_plus?

    Eno

  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

    A lot of scripts and even just plain pages have problems in IE 8. As far as I understand it, it generally has to do with the way IE 8 interprets the style. In many cases, IE 8 which doesn't need as many workarounds as previous versions is still following poorly designed hacks meant for those earlier versions. Personally though, I'm not about to test stuff in IE 8 until it's released, which is currently undisclosed as far as I know, unless I get paid for it, preferably by Microsoft.

    In the meantime, you may include this meta tag in the head of your page, right before the title tag:

    Code:
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    In most cases, that will take care of the problem.

    See also:

    http://www.dynamicdrive.com/forums/s...94&postcount=1
    - 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:

    Enomic (11-21-2008)

  10. #8
    Join Date
    Nov 2008
    Location
    Harstad, Norway
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    Thanks a lot . . . . .
    That made the difference!

    Eno

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
  •