Log in

View Full Version : Dynamic Ajax content and Lightbox2



strobistseth
02-22-2009, 11:46 PM
The issue: I'm trying to get an html page with lightbox gallery working with the dynamic content div on the main index page. I've tried everything I could find from other people having the same issues but I'm completely lost when people start talking about jquerry and php or asp. I just want it to work the way it said it would work with loadobj for the css and javascripts.

Please have a look at the two pages. Tell me what I'm missing here because I just don't get it anymore.:(

http://strobistseth.com/

Now this is the gallery html I'm trying to load in the menu if I try loadobj the page will briefly show and then blank out and continue loading without timing out. I have it last set at "pollcontent" because that's what another post suggested.
http://strobistseth.com/gallery.html

Thank you for anyone's help.

jscheuer1
02-23-2009, 04:59 PM
I just want it to work the way it said it would work with loadobj for the css and javascripts.

Don't you mean the way you thought it said that it would?

In any case, I'm not real familiar with the demo on that page, at least not enough to know how misleading it may or may not be. I do know that the loadobjs thing is just not really all that useful. Anything added by it must be fetched by the server and then parsed by the browser. Aside from the fact that if you fetch a script that has onload initialization for the page (a problem with many scripts and AJAX because the page is already loaded), with large scripts or stylesheets, they simply may not arrive in a timely manner.

So, forget about loadobjs. Put the scripts and styles you want to use on the 'top' page. For Lightbox, for it to work with imported content, you need to upgrade to version 2.04 or 2.04a. This post:

http://www.dynamicdrive.com/forums/showpost.php?p=163470&postcount=1

has links to both. I recommend my v2.04a of this script simply because it fixes some glaring bugs of the author's version, it also has additional features which are optional and may be of interest. If you are not using some of the more advanced features of Lightbox though (notably - triggers in image maps, grouped images that could need to be culled for duplicates), the author's version 2.04 is fine.