how to open a link in new tab in chrome extension?

Open link in a tab from chrome extension's iframe

  • I have developed a pop up extension for google chrome. I have added an iframe in that popup. Now when i try to open a link from that iframe.. its not working.. its not even working within the iframe itself. i need the links in iframe to be opened in a new tab. I tried writing some scripts which can change href in a to be opened in a new tab or in the same tab. But how to do that for an iframe. Note: The page loaded in iframe is in my control and can be changed if needed.

  • Answer:

    Put <base target="_blank"/> into <head> of that iframe. You can also mark individual links with target="_blank".

Jeyanth Kumar at Stack Overflow Visit the source

Was this solution helpful to you?

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.