I need to open a page in a new tab. That page has a XAML app that prints a special barcode we use in our web application. We manage to do that with a simple window.open. The problem is that besides opening the page, IE moves to that tab in stead of staying in the current tab. I’ve tried
//open the printing window
win2 = window.open('printingPage.aspx');
//set focus back to opener page
win2.blur();
window.focus();
window.document.focus();
but none of that worked. Is there a way to avoid that? I need this to work with IE 9+, we don’t care for other browsers nor versions (for now at least).
Thanks in advance!
You can’t control how the browser toggles display of the tabs.
If you can inform your users, they can press CTRL before clicking the link or middle click (the scroll wheel on most mice) to open the tab “in the background” but that’s about all you can do.