How do I maintain the scroll position of the parent page when I open new window using window.open()? The parent page returns to the top of the page.
Here is my current code:
<a href="#" onclick="javascript: window.open('myPage.aspx');">
Open New Window
</a>
<a href="#" onclick="window.open('myPage.aspx');return false;">Open New Window</a>
javascript:
is not required in event attributes.<a href="#">Scroll to top</a>
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With