I'm using google chrome browser and trying to switch the focus between two browser tabs whose origin is same using JavaScript.
I open a tab say tab_1 using
window.open("www.example.com/{data}","_blank");
And then I open some new tabs say tab_2, tab_3 and tab_4 in the same browser and go back to the first tab tab_1 (www.example.com/{data}). Then I do some work on tab_4 and after clicking on the submit button, I close the current tab using window.close() and the focus goes to tab_3 but I want to shift the focus to tab_1 instead.
So, how can I change the focus of the current browser to a specific tab which I opened using window.open() statement?
If it's not possible using Javascript, please help me with any other solution to achieve this.