A url ParentUrl is opened in a window MainWindow On click of a button in that page I am opening a new window - Window-1
window.open(url1,"","width=1024,height=600,scrollbars=yes")
Now in this opened window (Window-1) I have another button which on click opens a new url in a new tab
window.open(url2)
Now this url2 is getting opened in a new tab in the parent window( Main Window ) . So Window-1 is getting minimized. I want the new tab to be opened in the window from where I triggered the click