Let’s say there is this html file that just has a button.
In the JavaScript file (added into the html file), jQuery is used to give the button a click function and it executes:
window.open('some-url');
This code opens the url in a new page but I want to be able to do things with that page whether it be to close it or to scroll it to a position.
I was think about doing this:
var web = window.open('some-url');
web.scrollTo(0,400);
However, this piece of code does not scroll to y-position of 400 in the newly opened link. Is there a way where I can make the ‘window’ refer to not ‘this’ but the some-url window?