Results 1 to 4 of 4

Thread: Help with Conveyor Belt & Lightbox

  1. #1
    Join Date
    Feb 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help with Conveyor Belt & Lightbox

    I was trying to tie these two scripts together cause I think the effect would be awesome. But I keep getting stuck with errors.
    Here is what I was trying to do....
    leftrightslide[0]='<a href="images/1_full.jpg" rel="lightbox" ><img src="1.jpg" /></a>'
    or I was trying
    leftrightslide[0]='<a href="images/1_full.jpg" onclick="lightbox" ><img src="1.jpg" /></a>'
    neither works, actually I don't even think they are correct syntax.

    In lightbox, a simple
    <a href="Image1_full.jpg" rel="lightbox" ><img src="1_thumb.jpg" /></a>
    works to call for the effect, I just can't get it to translate to the conveyor belt script.

    I can open pop-ups in conveyor using this
    leftrightslide[0]='<a href="#" onclick=NewWindow("images/Image1_full.jpg",\'mywin\',\'500\',\'500\',\'no\',\'center\');return false" onfocus="this.blur()"><img src="Images/Thumbnails/1.jpg" border=1></a>'
    after reading about it in these forums (thank you to jscheuer1 )
    ...Can I use the same principle to call the lightbox.js? How? I'm stumped and my understanding of javascript is lacking, so I appreciate all the help I can get!

    Scripts:
    http://www.dynamicdrive.com/dynamici...tbox/index.htm [Lightbox]
    http://www.dynamicdrive.com/dynamici...rightslide.htm [Conveyor]

    --Cj--
    Last edited by cjkoenig; 02-04-2006 at 12:03 AM.

  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

    Actually, your first syntax looks good:

    Code:
    leftrightslide[0]='<a href="images/1_full.jpg" rel="lightbox" ><img src="1.jpg" /></a>'
    The problem appears to be conflict between the two scripts' onload behaviors. This should be able to be resolved by removing this line from the conveyor script (it's about halfway down in the code):

    Code:
    window.onload=fillup
    and putting it in an independent script code block in the head of the page before the link to the lightbox script:

    HTML Code:
    <link rel="stylesheet" href="lightbox.css" type="text/css" media="screen" />
    <script type="text/javascript">
    window.onload=fillup
    </script>
    <script type="text/javascript" src="lightbox.js"></script>
    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default ThankS!!

    Jscheuer1, Thank you! Thank you!

    It took alittle more then just moving the window.onload. I realized I had to define the variables, load the array and define the function 'fillup' all before I called for the lightbox.js. But without you pointing out that conflict, I don't think I ever would have got this.

    --Cj--

  4. #4
    Join Date
    Feb 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    What else was necessary to make window.onload work. I'm afraid I'm new to this and am not sure what is needed. Has anyone an example I can look at?

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
  •