I have a collection for the members of my website (name, email, phone, ...). I have added the ability for users to view (and update) their profile information. On the page to modify members information, they can change their information including their image/avatar using the "upload button". When the upload is "complete", I would like to refresh the image that is currently displayed. Once the upload is complete, how do you refresh the image so the user can see the change? Thanks!
![](https://static.wixstatic.com/media/a27d24_a09fea72e0444060884dde9095310627~mv2.jpg/v1/fill/w_869,h_475,al_c,q_85,enc_auto/a27d24_a09fea72e0444060884dde9095310627~mv2.jpg)
Where in the code the $w('#dataset1').refresh(); should be added?
It is not working for me..
Question #1: where in the code presented in the https://support.wix.com/en/article/how-to-use-the-upload-button-with-code that you add "$w('#dataset1').refresh();"?
Question #2: What code should you write to save the uploaded image and where should I add the code?
Thanks,
Louise
@Uri Tagger - thanks for this!!
$w('#dataset1').refresh();
Thanks Andreas. My image is connected to the data set. Would you mind telling me how to fire off a "re-query" after the upload is complete? I am sure it is easy but am new to WIX code and events. Thanks!
EDIT: I am going to use the code and example here. I like the "two button" approach. Hopefully this helps others as well. See: https://support.wix.com/en/article/how-to-use-the-upload-button-with-code
If you connect the image to the dataset you just re query the dataset after and it will be updated.