top of page

Forum Posts

justus_r
Apr 30, 2024
In Velo (Wix Code)
I have encountered a situation that has me puzzled at the moment. I am trying to refresh a repeater; the refresh works when I run the page from the Editor, either from the Run or Preview buttons, but it does not work in either a Test Site or the Live Site. If anyone can give me an idea as to what is happening, I would be grateful.  I created this site for a client about four years ago. He organizes and leads adventure scuba expeditions to various sites around the world. There is a site page to gather data about Members (not the Wix Member collection, a separate one): the usual identity and contact info, plus data on the members qualifications and certifications which determine if they can go on a specific trip. I was asked to add the capability for the Member to upload an image of their passport.  The following are portions of the code. Live site is www.brave-diving.com /* -------------------------------------------------------------------- */ export function btnUpdatePassportImage_click(event) { $w('#uploadButton1').show(); $w('#collapsibleTextLoad').show(); $w('#btnUploadPassportImage').show(); } /*-------------------------------------------------------------------- */ export async function btnUploadPassportImage_click(event) { if ($w('#uploadButton1').value.length > 0) { $w('#uploadButton1').startUpload() .then ((UploadFile)=> { imgUrl = UploadFile.url; $w('#btnMessage').label = "Upload Successful"; let errorMessage = $w('#btnMessage'); errorMessage.show("bounce"); setTimeout(() => { errorMessage.hide("bounce"); }, 3000); refreshRepeater(); }); } else { $w('#btnMessage').label = "Please specify a file to upload."; let errorMessage = $w('#btnMessage'); errorMessage.show("bounce"); setTimeout(() => { errorMessage.hide("bounce"); }, 3000); } } /* -------------------------------------------------------------------- */ function refreshRepeater() { // put imgUrl into an array for the repeater const imgUrlArray = [ {_id: '1', repeaterUrl : imgUrl} ]; $w("#repeaterPassportImage").onItemReady( ($item, itemData) => { $item("#imgPassportPg").src = itemData.repeaterUrl }) $w('#repeaterPassportImage').data = imgUrlArray; $w('#imgPassportPg').show(); }
0
2
10
justus_rjustus_r

justus_r

More actions
bottom of page