Hello , everyone. Was wondering if you can put a single popup that could appear to many visitors to a site at the same time , regardless of the page you 're browsing . Is there a chance to do it in JavaScript or another language ? How could i do it? Iappreciate the help .
Yes, do you mean like everyone gets it at exactly 10am with some sort of announcement? Essentially you just need something in the header to say when it's X o'clock show the popup, save a cookie saying they've seen it and don't show again if the cookie has been saved. Have a listener checking the time so that it pops for pages open already
Sarahk, first of all, thanks for your help. My problem is that the popup window will appear randomly in the page. What can i do to make all visitors see that window at the same time?
Have a javascript listener that checks for the time when the page loads and then issues a wait for the required amount of time. If the page is still open when the wait is over then the pop shows.
The potential problem is this: Do you want all users to see the content at the same time, regardless of local timezone? If so, no problem, just listen for a server-timestamp. Do you want all users, regardless of timezone, to see the popup at 10:00 am? Then it gets complicated...
Hey, PoPSiCLe, i haven't thought about that. I wanted everyone to see the popup at the exact same time. Better think on something else. Thanks.
I'm not sure why that's put you off. The server time or the local time are equally accessible. Most scripts that do a countdown (to an event/product launch/new year) essentially get a time when the page loads and work from there So if you need to run at a certain local time you use javascript to get the time If you need to run at a certain server time you can embed the current time into the html that gets sent by the server to the browser.