View Full Version : dynamic ajax content and lightbox still not working

04-26-2007, 04:14 PM
1) Script Title: Dynamic Ajax Content

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm

3) Describe problem: hi
iíve been trying to use lightbox from a link in a div loaded via ajax (Dynamic Ajax Content)Öand it doesnít work!
1) i checked tha paths
2) there are no conflicts beween scripts
3) so iím stuck
4) i added the initLightbox() function at the end of the loaded content but still it doesn't work.
any idea? has anyone had similar issues before?

this is tha page i'm workin' on
(choose something from the first and second select
1 -if you click on the zoom img a lightbox page should open and it doesn't
2 - if you click on the bottle image a (working on its own) index.html page open but it doesn't work in the website)
thanks vitto

04-26-2007, 04:40 PM

04-27-2007, 10:19 AM
hi john
thanks for the quick reply! i followed the instruction and managed to make it work, but only partially. i guess it's a problem with the lightboxGoneWild script so i'm not sure this is the right forum to go on with this..but if you have direct experience about this it could be very useful for me.

As you can see from the page

the lightboxGoneWild works fine the first time but if i select a different option from a select menu on top the lightbox doesn't work. It's weird because at the moment all the select options call the same page therefore the same script. Any idea about that?
Many thanx again

04-27-2007, 12:57 PM
I don't really see where you are using any of the suggestions from the linked post in your code on the page you linked to. Perhaps I missed it.

In any case, since you are using a select element's onchange event to load the Ajax content, that is where you should set the:


<select id="mainSelection" onchange="window.acInit=false;populateSubSelection()" name="s1">
<option>Visualizza per</option>
<option value="problema">Problematiche</option>
<option value="prodotto">Prodotti</option>

Then on the inserted content page, the links that fire lytebox (which I couldn't find) or their container should have the mouseover initialization event that also sets:



04-27-2007, 02:01 PM
many thanks again!!!
it's weird you can't see the code. If you have firefox you should probably look at the generated code (with the developer bar installed).

Now everything works fine; there's still a couple of things not 100% right but they concern me and the LightboxGoneWild script:).

I really appreciate.