Executing JavaScript Commands in Another Window

29 Views Asked by At

I have this program that requires me to open an window using the window.open("https://link_goes_here") javascript command, and then use more javascript stuff to do reload() and to open some chrome:// links. I lost the origional code that I used for this (accidentally wiped the SSD of my computer :P), but heres the mockup of it:

<script>
function hi() {
//This opens the window V
    window.open("https://link_goes_here.com")
//This is going to happen to the window V
window.open("chrome://this_is_a_chrome_link")
reload()
window.open("chrome://this_is_another_chrome_link")
}
</script>

<button onclick="hi()">Click Me!</button>

(its in HTML)

I have no idea what do do, and I can't find anything online. The general gist of this is how to get the javascript to run in the window, like the reload() and changing the link to the window to a chrome tab? Thanks in advance :). (also I am very stupid so please elaborate when you are answering. Thanks!)

0

There are 0 best solutions below