Hi, I would like to have a popup window appear after a user submit information , the window should be on and the page “behind” it should be disabled until processing is done.
I tried implementing it with a lightbox using the following method:
User presses ‘submit’
wixWindow open the relevant lightbox
Processing starts
Processing ends - a cookie value is set to reflect it
onReady of lightbox:
run a while loop with setTimeout set to 500ms
Check cookie value to see if processing is done
If so - close lightbox
It doesn’t work as code flow is moved to lightbox while its open so the page can’t set the cookie value while light box is open etc. (deadlock)
Also, if user while click outside the lightbox it will close even though the processing is not done.
So, I’m here looking for any suggestions the community might have.
(I know I can set a strip with the pop up window and show it while collapsing all other strips on page but I’m looking for something like this:
Hi J. D. I already deleted my code for the lightbox and simply froze the page while saving is done but its an interim solution.
Basically what I’m trying to do is to prevent user interact with page while data is being saved in DB (it takes a few seconds). I don’t want user to look at a blank page or think nothing is happening so I though about disabling the page and showing a pop up window while saving is done in the background.
The light box solution (as I understand it) is not good because:
User can click outside lightbox and it will close
While light box is open code is run from lightbox code so there is no way for it to know processing is done since I can’t update nothing while its open
I see what you want, and I like your idea. It is not annoying, but it still is unavoidable. When making my first site, I was disturbed by a question about popups; they have never worked the way I wanted, and it drove me crazy. Thanks to sites like popup builder , I can get any popup I want now without extra effort, which is great. I love designing, but programming isn’t my thing. I can only suggest ordering a popup (moreover, many companies and sites got Christmas sales soon) if you can’t make a proper alone. I hate doing something which I don’t enjoy or don’t know how to do, so it is the best option sometimes.