Please help to assist as still unable to display the image thru Lightbox.
Not sure if it is coding issues or database issue?
Successfully displayed the search dataset table results with all the fields (incl one photo column) from the database. However when trying to implement user select the cell from the result dataset table, not unable to display the click selected image of the dataset table via Lightbox.
Many thanks for helping me out on this issue.
-----------------------------------------------------------------------------------
import wixData from 'wix-data';
......
......
export function searchButton_onClick() {
$w('#dataset1').onReady(function () {
wixData.query('WixRunningEventsDB')
......
......
import wixWindow from 'wix-window';
export function table1_cellSelect(event) {
$w('#dataset1').setCurrentItemIndex(event.itemIndex)
.then(() => {
wixWindow.openLightbox('ImagePhoto',
$w('#dataset1').getCurrentItem());
});
}
![](https://static.wixstatic.com/media/a27d24_d40f121faf8c4468beb0e6dacb593e1c~mv2.jpg/v1/fill/w_980,h_551,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/a27d24_d40f121faf8c4468beb0e6dacb593e1c~mv2.jpg)
Still no reply on my issue. Any kind person able to help me out?
Many thanks in advance.
I'm still having this issue and no one replied.
Anyone able to help urgently? Many thanks.
Hi,
Is anyone able to help out with this issue?
Thanks
Hi Roi,
Can you please help to look at my page (wow2wow.com) again. In editor the page name is "Display Image By Lightbox".
1) Used to displayed the image from the result table perfectly but now unable and only displayed the default image photo and not the photo from the result table when clicked. This code was working fine a few months ago. There is error msg currently as below.
Did not changed anything from last time.
2) How can i change the size of the photo display once click the table row (to have full screen or larger than current default table output size).
Thanks again for your help.
Ming.
Thank you Mr Roi Bendet for your great solution. Works perfectly and love it.
Really appreciated for your time in helping to solve my problem.
Have a great week ahead.
Cheers
Hi,
I would do it differently.
Tell me what you think,
export function table1_rowSelect(event, $w) { wixWindow.openLightbox('ImagePhoto', event.rowData); }
And in the Lightbox:
$w.onReady( () => { let item = lightbox.getContext(); $w('#image6').src = item.photo; });
Roi
Hi Roi,
Many thanks for your time. I changed as suggested but still unable to pass the table results (i.e the photo column) to Lightbox and displayed it.
Appreciated if you can check my codes as to what could be the issues? Please help to show me how to pass the table column details to Lightbox and displayed it.
Trying desperately to solve this last requirement.
Regards
Hi,
In line 65 you have a mistake.
$w('#dataset1').setCurrentItemIndex(event.rowIndex) // instead of event.itemIndex
Good luck
Roi
Thanks Andreas for the quick reply. Really appreciate your help.
Unfortunately I'm still having issues even after changing to row select. Dataset name looks correct as have no issue before and without Lightbox implementation.
Hope some wix code expert can assist on my issue.
Hey
First your code says #Dataset1 is not a valid data selector. This is crucial to solve, the dataset you have on your page, click on it and look in the property panel for it's ID. Put that ID inside your code where you get that error.
If the Dataset1 is not configured correct your dataset actions won't work.
Then also make sure you have row select activated in the Table and not Cell select. That will make it easier.