Results 1 to 7 of 7

Thread: Lightbox and other scripts dont mingle?

  1. #1
    Join Date
    Aug 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Lightbox and other scripts dont mingle?

    1) Script Title: Light Box 1

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

    3) Describe problem: Not working well with other scripts.

    www.3sstudios.com

    Thanks alot guys

  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

    Well, you could have described the problem in a bit more detail, like which other script(s). Anyways, the main problem lightbox has in combining with other scripts is that it must initialize its links after they have been written to the page. On a normal installation of lightbox, it does this onload of the page. But, since many scripts write and/or rewrite links to a page as a normal part of their operation, lightbox must be reinited after each action of this sort that involves its links.

    What I usually do is find a spot in the other script just after said links have been written to the page (not just to some variable for later use) and put this short line in:

    Code:
    initLightbox();
    There can be other considerations but, as long as there is no onload conflict or shared object/function/variable names between the two scripts and the other script has been modified (if applicable) to write the light box style of link, it will almost always work.
    - John
    ________________________

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

  3. #3
    Join Date
    Jul 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    1) Script Title: Light Box 1

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



    Hi i am using the lightbox coding, and i think there is a conflict.

    the page in connection is: http://www.splay.co.uk/PRODUCTS/Cricket-Balls-club3.htm

    The link is at the bottom of the page.



    But i think it is conflicting becuase it works on a new blank page http://www.splay.co.uk/new7.htm



    i am guessing i have got 2 many scripts aswell...can someone lead me the right way to knowing which ones i can delete safely? thanks in advanced
    Last edited by vik007; 09-06-2006 at 11:57 PM.

  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

    Code:
    http://www.splay.co.uk/PRODUCTS/js/prototype.js
    http://www.splay.co.uk/PRODUCTS/js/scriptaculous.js?load=effects
    http://www.splay.co.uk/PRODUCTS/js/lightbox.js
    These files are all missing. There could be other problems.
    - John
    ________________________

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

  5. #5
    Join Date
    Jul 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Brilliant...worked perfectly:-)

    I was basically going wrong because those files were not in the Products folder. didnt think to put them there becuase i thought they are in the main root anyway....ohhh well

    thanks for your help

  6. #6
    Join Date
    Jul 2006
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi got a slight problem.

    Iv basically pasted the coding in the top on a new page..(in the same folder as the products)

    iv also pasted the same coding, to a new page...the window opens, but only the one picture pops up?

    When checked in the html coding, the coding only seems to show just the one.

    Iv tried to enter in the coding again, for th 2nd pix, but still the one pix only opens.

    You can check it out here.

    http://www.splay.co.uk/PRODUCTS/heal...essuremat2.htm

    it is a bit weird, cuz the lightbox pop up opens in frontpage preview, but when uploaded, it doesnt??

    thanks

  7. #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

    One thing I can tell you is that your vml is preventing lightbox from working at all in Opera or FF. The ball and the vml effects get displayed but the link is not clickable. But to get it to work with the other balls in IE:

    Code:
    <!--[if gte vml 1]><v:rect id="_x0000_s1062"
     alt="" style='width:141.75pt;height:132pt' strokecolor="#969696">
     <v:shadow on="t" opacity=".5" offset="6pt,6pt"/>
     <v:textbox>
    <table cellspacing="0" cellpadding="0" width="100%" height="100%">
      <tr>
        <td align="center">
        <a href="../Stock%20Pictures/Footballs/splayband.jpg" rel="lightbox[roadtrip]">
        <img src="../Stock%20Pictures/Footballs/splayband.jpg" width="100" height="97" alt /></a>
    <a href="../Stock%20Pictures/Footballs/splayclub.jpg" rel="lightbox[roadtrip]"></a>
    <a href="../Stock%20Pictures/Footballs/splaystripe.jpg" rel="lightbox[roadtrip]"></a>
        </a></td>
      </tr>
    </table>
     </v:textbox>
    </v:rect><![endif]-->
    Notes: I'd suggest dropping the vml so it can work in other browsers.
    - John
    ________________________

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

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
  •