I am using the Lightbox2 script on my website.

here is an example of it working correctly on my search engine:
http://www.tcdb.org/go.php?query=maltose&button=Submit

(Click any link that says "View Tree")

Now, when we attempt the same thing on a page with many more results:
http://www.tcdb.org/go.php?query=sugar&button=Submit

the lightbox containing my tree shows up far down, after I scroll. How can I make my lightbox work properly for long pages, so that it appears wherever I am currently scrolled to?

Thanks!

Member Avatar for stbuchok

In the lightbox.js file take a look at the code below the comment "// calculate top and left offset for the lightbox"

This looks to be where it is calculating the top and left (as the comment states). You can try playing around with this to see if you can get it to work.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.