I would like a suggestion on how I can create a Source page that automatically opens another page in a new window (in this case a store) after 15 seconds.
In practice now the page contains some buttons that open other pages, for example if 15 seconds pass (it would be nice to also insert and display a countdown), the store should automatically open in another window.
I don’t think it’s difficult, but unfortunately I’m out of ideas…
If you need to open a new window, you can only do that using the JavaScript window.open statement, but that has been blocked for first time visitors by pretty much all browsers for years (to prevent window pop-up spam).
I agree with @Heroic_Nonsense , the proposed solution falls short of the original brief of a page automatically opening in a new browser window after a 15 second countdown has commenced. Wherever that Javascript code was copied from, it’s old, it doesn’t do what you want, and it doesn’t conform to modern standards.
Perhaps you can provide us some more context about exactly what is needing to be accomplished here?
Popups and things opening in new windows are blocked in modern web browsers, for obvious security and annoyance reasons. They only work if initiated by the user via an event handler, like a click on a button. Even then, you can probably only spawn a new tab, rather than a whole new browser window.
Otherwise we would all be opening new windows secretly on your computer for our Bitcoin mining operations.
because the count of seconds made me and those who looked at it anxious, honestly.
@willwood , can I ask you something else?
I use on the Fancy Intro page, how can I make it so that at the end of the animation I can be redirected to https://half-moon-by-cesar-salumi-porchettificio.sumupstore.com?
The page where Fancy Intro resides is in a different domain from the store, it is an empty page, only the animation (which I really like), and as the animation ends I would like a redirect to the store.
It is feasible? It could be done?
@Gianluca I think it would be feasible to have FancyIntro redirect to another page after the animation sequence has finished. But I would need to update the stack, so that there’s new code and settings to support this for you.
Looks like Joost had the option to set a browser cookie after the animation is run. So it may just be a case of me tagging-on some extra code to do the redirect when the animation sequence completes.
sorry again @willwood , without modifying the stack, but only adding a portion of code via another stack (where it will be written by hand that when the animation ends the redirect must start by also inserting the destination URL), could it work? It would be easier to implement… if it were feasible, could you help me? Thank you for your time.
Please email me via the website if this is something you need me to add. This is code that would need to be added to the stack itself. It can’t just be added in the page inspector as you would do with custom CSS etc. Modifications to the stack itself are needed.