Would it be possible to make something like:
Button - on press -> go to url - - target self
-> go to Layout 2
For now, all I can get is a browser opening destination url, but not executing javasctipt (alert for example) nor proceeding to Layout 2...
Target self means it's going to go to a new url, and leave the current one
You can't change your shirt, if it's at your house, and you are at the neighbours.
You will have to ask the neighbours.
Develop games in your browser. Powerful, performant & highly capable.
I understand the security risk, but could I run JS in same tab? For example, if I'd like to make a game that opens website in the background with some sort of overlay UI built in C2? I'd like to use some sort of buttons that would fire JS on the page in the background (find some elements, change inner html, change style of divs etc...) (Idea is sort of an educational game/ap)
I think you might be able to overlay an iframe, but you still can't force it to run your own JS, for the same reasons.
Couldn't you achieve the same effect using local storage?
Not sure best way but maybe:
On layout start -> set global variable to random number
On button -> store global variable into local storage, open new window
I actually haven't used local storage yet so doubt that is exactly how it would go but hopefully that conveyed the premise. I've used mySQL tables before and feel like I could achieve this with them, but figured local storage could as well and would be much simpler