Support » Plugins » lightbox and the onload problem…

  • OK,

    I have a site that has the lightbox plugin installed and running. The problem is that while the page is still loading and when you click on a thumbnail during this process, it doesn’t load the lightbox feature, instead it just takes you to the image iself as though lightbox isn’t even there. I have done many many searches on google and elsewhere for fixes, but not a single one of them have worked. Does anyone know how to get past this?

    Thank you,
    Kahil

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter Kahil

    (@kahil)

    Well… I have done some more searches on google and I found a couple things that claimed to work, but they didn’t…

    Can anyone help with this?

    Thank you,
    Kahil

    kahil,

    a tad impatient? Thats pretty normal.. part of the page loading.

    the fix is to speed up the page load.

    I just checked your site and tested the rose on the fake fur image. It had loaded just fine by the time i scrolled to the image.

    My unsolicited advice: deal with the very small imperfection and move onto something more important 🙂

    Adding this to your footer MAY work, but I’m not 100% sure:

    <script type="text/javascript">myLightbox = new Lightbox();</script>

    Try it and see.

    Thread Starter Kahil

    (@kahil)

    well… I did a trace for the site to see where all my connection was going before the page is loaded. Don’t be shocked, but the site is hosted on GoDaddy…lol…

    The site is workingfirefighters.com

    the main place this happens are in the galleries. In the trace, it shows an average of 166ms delay before there is a time out and the page begins to load slowly… the gallery pages have a decent number of thumbnails on them. I could decrease the number of thumbnails on it, but that would just mean making many many new pages and then linking them all together…

    The searches I have found claim that they have figured it out, but none I have found work at all…

    BTW, whooami, I am having another problem I think you prolly could help with RE: my htaccess file…

    Thank you,
    Kahil

    Thread Starter Kahil

    (@kahil)

    Well viper, slap me silly and call me susan! it worked!!!

    Thank you very much!!!! My friend is a photographer and has been hounding me to figure it out for him cause people were stealing his images…

    Thank you!!

    hmmm firefighters? I wont ask 😛

    you can email me bout the .htaccess if you want — I DID get your email a while back bout something, was going to reply, then forgot. Was it/Is it about that? If so, send again.

    Well viper, slap me silly and call me susan! it worked!!!

    Heh, good to know. 🙂

    Basically, all it’s doing is starting the Javascript once all of the HTML is loaded rather than once the whole page itself is loaded.

    And you should actually use this incase the JS file doesn’t load:

    <script type="text/javascript">if (fileLoadingImage) { myLightbox = new Lightbox(); }</script>

    Thread Starter Kahil

    (@kahil)

    the lightbox script now starts while the page is loading, but I don’t think it loads it all… it won’t let you close the over lay when you click on the close button and it won’t let you cycle through the other images..

    EDIT… only in firefox it seems… i’ll see what my firefox settings are and let everyone know if anything works…

    Hmm, works fine here, but then again, I’m testing on my localhost and it loads instantly. However, I disabled the window.onload event in the script so only the code I posted above is activating it and it seems to be working fine for me.

    Got a link to their site?

    Thread Starter Kahil

    (@kahil)

    you disabled the onload in the script?

    how do I do the same?

    Well just to test. Having the above code initiate the script as well as the script itself doing it shouldn’t be any harm.

    Thread Starter Kahil

    (@kahil)

    hmmm… are you refering to using the script itself? I am using the lightbox wordpress plugin, does that matter?

    thank you

    Thread Starter Kahil

    (@kahil)

    it seems as though if someone is impatient and clicks on a thumbnail once one comes up, then it doesn’t load, but if you wait another couple seconds it loads completely… I know people prolly won’t click a thumbnail that fast, I was just testing it out…

    Oh, yeah, I’m using the real lightbox (non-plugin), but I think it’s probably the same thing.

    Thread Starter Kahil

    (@kahil)

    yeah, its the same thing, I just checked the files used and they all match up…

    but yeah, it seems to be working unless you click a thumb right when the page starts loading… I’m no expert, but I think that not all the aspects of the lightbox code gets to load…

    so as long as people aren’t super impatient, there shouldn’t be a problem…

    Thank you!!!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘lightbox and the onload problem…’ is closed to new replies.