Hi guys,
This is my first post, but definitely not my first time in the forum – thank you all for this great community!
I have a setup where clicking on container boxes from a repeater connected to a dataset opens a lightbox, to which I pass the information.
I have two such lightboxes on two different pages (connected to different datasets).
One works great, but on the second one, opening the first one goes great, all the information is pulled correctly, but upon closing it and opening another one, the lightbox displays the data of the first one clicked.
The console returns the following:
uncaught exception: Lightbox is open
I implemented basically the same code on both pages in question.
For the wix admins out there:
– Link removed –
The page that doesn’t work is Faculty (with the matching FacultyLightbox) and the page that does work is program (with the matching LecturesLightbox)
I appreciate your help greatly!
@Yisrael (Wix) - I saw your name a lot on this forum – really hope you find what I might have done wrong (or otherwise)
Thanks!
I didn’t see the error that you referred to, however…
A couple of observations:
You have the repeater image connected to the Lightbox. That will cause a conflict with openLightbox when clicking on a Repeater item.
In both Lightboxes, you do a dataset.setFilter() in the pages onReady() function, but you need to put the code that does setFilter inside of a dataset.onReady() event handler . The reason is that even though the page is ready, that does not guarantee that the dataset is ready.
Yisrael, thank you so much!
The link on the repeater image was the problem – Once I removed it, it worked as I expected!
Thanks once again!
If you use Javascript to trigger the lightbox to open. Make sure the component in you repeater does not also trigger the lighbox to open as well. Otherwise, you may see the above error because you have trigger the lightbox to open twice and exception will occur.
Hi is there any way to solve this issue when there is no data set
the case where a table on a lightbox open another lightbox and the exception occured. no way to close the open lightbox even with lightbox.close(‘nameoflightbox’)
looks like the exception is due to the table repeater like mentions above