How to make a link open in tabbed or new window without target attribute?

Posted by Alan McCloud on Stack Overflow See other posts from Stack Overflow or by Alan McCloud
Published on 2011-01-15T15:40:57Z Indexed on 2011/01/15 15:53 UTC
Read the original article Hit count: 295

Filed under:
|
|

In my application an external website places link in my web page and the link does not have target=_blank. More specifically its iframe in my webpage whose src is another domain which I have no control. The content in this iframe contains links that opens in the same window wiping off my ajax driven web page and taking the user to the other domain. Is there a way to intercept this ( via javascript? ) and make the link open in another window or browser tab? It would be even much better if the link opens within the same iframe on my webpage. Is this possible? Is target="_self" makes the link open in the same iframe?

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about html