WB
Web Bae8mo ago
Purv

Warning dialog box

Hello everyone I am helping a client to setup a template and they want a dialog box there, on which the user clicks on "I agree" button they are able to access the websites content after that and that should only appear one time for a user. I have got some code from chat gpt when I add the code , I can see the code is getting executed in console but when I am refreshing the page the warning box is coming back again. Has anyone done the same sort of thing in past can give me some tips on hope to achieve this and any insights @Web Bae ? Code is in the before tag in page settings. preview link : https://preview.webflow.com/preview/grasshopper-travels1?utm_medium=preview_link&utm_source=designer&utm_content=grasshopper-travels1&preview=226597617087a6f43295e2398aaa1a51&workflow=preview live link : https://grasshopper-travels1.webflow.io/
Discover Your Dream Destinations with Grasshopper Travels
Embark on unforgettable journeys to breathtaking locations around the world. Find your perfect getaway today.
4 Replies
Web Bae
Web Bae8mo ago
Hey @Purv it looks like the sessionStorage is never being set
Web Bae
Web Bae8mo ago
Use a GIF as a page preloader AND only show it once per day
Learn how to use a GIF as a page preloader AND only show it once per day
Web Bae
Web Bae8mo ago
you'll have to modify it from using setTimeout to waiting on a user action (click)
Purv
Purv7mo ago
will try to modify it , thank you for insights. Thank you for your insights @Web Bae I modified the code using your instructions and its working properly now just a small issue when I refresh the page the dialog box shows up for a few seconds but it gets hidden eventually. PS: refined the code now its working properly.
Want results from more Discord servers?
Add your server