Advanced Search

Results 1 to 5 of 5

Thread: Lightbox v2.03a js error - not displaying images

  1. #1
    Join Date
    Aug 2010
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lightbox v2.03a js error - not displaying images

    1) Script Title: Lightbox image viewer v2.03a

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

    3) Describe problem:
    Hello, I installed Lightbox v2.03a, I've double checked everything and it looks OK to me. When I launch the page www.artisanbuildersca.com/projects2.php it does not display the image thumbnails (there are three images), although I can mouseover where the thumbnails should be and my cursor changes to indicate a link is there. When I click the link it displays the image in a new tab.
    IE9 reports the following JS error :
    SCRIPT5007: Unable to set value of the property 'width': object is null or undefined
    lightbox.js, line 106 character 6

    I'm using Windows 7/ IE9.

    I must be doing something wrong but I can't see it. Sorry but javascript is a bit beyond me currently. Thanks for any help

    Tony

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,693
    Thanks
    43
    Thanked 3,129 Times in 3,095 Posts
    Blog Entries
    12

    Default

    There could also be other problems but that version of Lightbox is incompatible with jQuery, so get rid of this:

    Code:
    <script src="js/jquery-1.7.js" type="text/javascript"></script>
    It doesn't look as though you're using it anyway. If you are, there are other versions of Lightbox as well as Lightbox like scripts that use jQuery instead of Prototype/Scriptaculous. So if you need jQuery, you would have to use one of those other box scripts. Even if you don't need jQuery, some of those other box scripts that use jQuery are better scripts.

    That should fix the larger image opening in another tab. The problem with the thumbnails not showing up is that there are no img tags for them. The Lightbox links are only text links. To have a thumbnail, you need the thumbnail version image of course, and you need to do something like so in the markup:

    Code:
    <a href="images/projects/test/ARTISAN_TRAILER.jpg" rel="lightbox[TEST]"><img src="images/projects/test/ARTISAN_TRAILER_THUMB.jpg" border="0"></a>
    - John
    ________________________

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

  3. #3
    Join Date
    Aug 2010
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    John, Thank you so much for the very complete response, I think I'll remove this version of LightBox and browse around DD for a better script that's compatible with jquery. I've used several DD scripts over the years, this is the first one I've had problems with.
    Do you have any recommendations for jquery compatible scripts similar to LightBox? Not your job to recommend I know, but....
    Thanks again,
    Tony Babb

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,693
    Thanks
    43
    Thanked 3,129 Times in 3,095 Posts
    Blog Entries
    12

    Default

    I don't think DD offers a jQuery Lightbox. For just a basic Lightbox see my blog:

    http://www.dynamicdrive.com/forums/e...d-SlimBox-Good

    In it I mention and link to Slimbox 2 and provide an optional init for it that alllows for a linked title. Follow the instructions there. I also mention and include links to Colorbox and Fancybox, which have greater capabilities. There are many more, some just as good if not better (authors often update these scripts). You can Google:

    jquery lightbox clones

    for more choices. Just be aware that some are not all that great. The last I checked, jQuery Lightbox wasn't all that great, but it may have been updated. One that came upon the scene more recently is EasyBox. It's very good as well.
    Last edited by jscheuer1; 01-30-2013 at 03:39 AM. Reason: spelling/punctuation
    - John
    ________________________

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

  5. #5
    Join Date
    Aug 2010
    Posts
    65
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    perfect, thank you very much.
    Tony

Similar Threads

  1. displaying all images in a dir
    By baconDelta in forum PHP
    Replies: 1
    Last Post: 01-24-2012, 11:38 PM
  2. Lightbox issue displaying Labels
    By DomainsNow in forum JavaScript
    Replies: 0
    Last Post: 01-26-2010, 06:47 PM
  3. Videobox (lightbox) not displaying correctly in IE7
    By JonnyFiveAlive in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 02-26-2009, 08:55 PM
  4. lightbox viewer not displaying above page..can anyone help?
    By urbannerd in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 05-23-2008, 11:15 AM
  5. Displaying Code to Public Error
    By namecomp in forum PHP
    Replies: 2
    Last Post: 04-30-2008, 06:35 AM

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
  •