Quantcast
Channel: Internet Explorer 8, 9, 10, 11 forum
Viewing all articles
Browse latest Browse all 10469

Open link in background when anchor's attribute "href" contains javascript

$
0
0

Hi community,

I support web enterprise-level application with some legacy parts, where some windows are opened by using window.open command inside of anchor's href attribute. (e.g. <a href="javascript:MyFunction('../someurl', '2')" ../> ... function MyFunction(url, id) { window.open(url, id) ...)

Now I have to open link in the background by pressing ctrl + click (or middle click), but for IE (9, 10, 11) it always becomes focused.

Are there any ways to open those new tabs in the background (only when ctrl is pressed)? 

P.S. I know that it would be better to provide actual link inside of href attribute, but unfortunatelly I don't have such options, due to application specific.

Thank you in advace for your help!


Viewing all articles
Browse latest Browse all 10469

Trending Articles