Results 1 to 4 of 4

Thread: Lightbox image viewer help

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

    Default Lightbox image viewer help

    1) Script Title:
    Lightbox image viewer

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...tbox/index.htm

    3) Describe problem:

    im using this script and i have another script in another js file and their is specific function in that script which i am calling in my html <body> tag like this <body onload="init();">
    because of this this script does not work but i should call this function too.

    any helP?

  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

    At the end of the lightbox.js file, change:

    Code:
    addLoadEvent(initLightbox);	// run initLightbox onLoad
    to:

    Code:
    addLoadEvent(function(){initLightbox();init();});	// run initLightbox onLoad
    And because some browsers might then run your init(); function twice, remove the onload statement from the body tag.

    There could also be other issues.
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    ff123 (09-30-2009)

  4. #3
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    At the end of the lightbox.js file, change:

    Code:
    addLoadEvent(initLightbox);	// run initLightbox onLoad
    to:

    Code:
    addLoadEvent(function(){initLightbox();init();});	// run initLightbox onLoad
    And because some browsers might then run your init(); function twice, remove the onload statement from the body tag.

    There could also be other issues.

    i tried this code but the problem is still there.. but i cannot remove init() from my body tag if I do that my script other than lighbox does not work than..

  5. #4
    Join Date
    Apr 2008
    Posts
    104
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    bro it worked thanx..

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
  •