Results 1 to 6 of 6

Thread: Urgent help needed: Lightbox script conflict!

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

    Default Urgent help needed: Lightbox script conflict!

    on my pages i have dhtml applied to some buttons, and then inserted the lightbox script for a gallery, for some odd reason lightbox isnt working correctly. the code is pasted below: can anyone help PLEASE

    <html>

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Fashion</title>
    <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript" src="lightbox.js"></script>
    <script language="JavaScript" fptype="dynamicanimation">
    <!--
    function dynAnimation() {}
    function clickSwapImg() {}
    //-->
    </script>
    <script language="JavaScript1.2" fptype="dynamicanimation" src="animate.js">
    </script>
    </head>

    <body bgcolor="#000000" onload="dynAnimation()" language="Javascript1.2">

  2. #2
    Join Date
    May 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default update!

    the page can be found at the below link,

    http://www.lumieres.biz/Fashion.htm

    the lightbox seems to work in opera browser but not in Internet explorer?

    Please Help

    thanks
    Mel

  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

    I want to make this clear to anyone reading this that this advice applies only to the 'original' circa 2006 version of lightbox (before version 2). Later versions 'play nice' with other onload events.

    That's because Opera sees window.onload="something" and <body onload="whatever_else" . . . > as two separate events. All other browsers that I am aware of do not, so the second one (in this case the body event) cancels the first one.

    Now, in this version of lightbox, at the end of lightbox.js we have:

    Code:
    addLoadEvent(initLightbox);	// run initLightbox onLoad
    which was meant to, but often fails to 'play nice' with other onload events, may be commented out:

    Code:
    //addLoadEvent(initLightbox);	// run initLightbox onLoad
    and then added to the body onload event (in this case, addition red):

    Code:
    <body bgcolor="#000000" onload="dynAnimation();initLightbox();" language="Javascript1.2">
    The highlighted language attribute is invalid for the body tag, and deprecated in its use elsewhere, so should be removed.
    - John
    ________________________

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

  4. #4
    Join Date
    May 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks so much!
    its fixed that issue...

    just another small problem, all my thumbnails, when in explorer, seem to have a blue border around them, which i understand indicates the hyperlink, any way of changing the colour or to remove the border?

    thanks once again
    Mel

  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

    To get rid of the border:

    Code:
    <a href="images/folio/Fashion/f1.jpg" rel="lightbox" ><img border=0 src="images/folio/Fashion/f1_small.jpg" width="33" height="50" /></a>
    To change its color:

    Code:
    <a href="images/folio/Fashion/f1.jpg" rel="lightbox" ><img style="border-color:black;" src="images/folio/Fashion/f1_small.jpg" width="33" height="50" /></a>
    Depending upon the rest of your page, it might just be easiest to put this in the head:

    Code:
    <style type="text/css">
    a img {
    border:none;
    }
    </style>
    That will get rid of the border on all linked images on the page. Other border styles or other styles may be used, see:

    http://www.eskimo.com/~bloo/indexdot...pindex/all.htm

    or your favorite style reference.
    - John
    ________________________

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

  6. #6
    Join Date
    May 2008
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks once again, both problems solved, site's now up and running
    Mel

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
  •