Can I open pages and external services in a new tab or window?

  • 1
  • Question
  • Updated 10 years ago
  • Answered
Can I set page or external link to open in a separate tab or window when clicking on an image within text that contains the link? Need to do so for background music on another page within the site and also for an external forum service.
Photo of 1331

1331

  • 73 Posts
  • 1 Reply Like
  • tryin' ta get r done.

Posted 10 years ago

  • 1
Photo of Marije

Marije, Official Rep

  • 4636 Posts
  • 237 Reply Likes
Hi there,

There is definitely a way to have a link open in a new window, but it means that you need to do a little HTML editing. Here are the steps:
1) Add text using the text widget
2) Select the text that you want the link and then click "insert link" on the text editing toolbar
3) Create your link to your chosen URL as normal, click ok
4) Then click "HTML" - the last icon on the text editing toolbar
5) You will see the code that looks like this for your link (I have used the text "Visit Wikipedia to see more information", with the link being on Wikipedia:
<!--- Visit <a href="http://www.wikipedia.org">Wikipedia&l...> to see more information<br> --->
All you need to do is add in target="blank" as show below:
<!--- Visit <a href="http://www.wikipedia.org" target="blank">Wikipedia</a> to see more information<br> --->

Don't use <!--- and ---> I have added these to stop the HTML from being interpreted.

Your link will then open in a new tab or window, depending on what browser your visitor is using.

Please note: current thinking in web usability circles is that links that open in a new window are a bad idea for a number of reasons. See: http://www.sitepoint.com/article/bewa..., for a great article by a leading expert in the field.
Photo of 1331

1331

  • 73 Posts
  • 1 Reply Like
Thank you for a very thorough answer. Doesn't really need to be in separate window. The idea with the music is to have it continue playing (if the visitor wishes) in the background while exploring "THE GAME", an online sculpture. Have been achieving it with right clicking the image with the link. Found another solution for the forum, so I don't need to link to external content any longer. Just need to go to a jute box on a different page and return in a new tab so the music will continue. Would there be any negatives to doing that? And if so, is there any alternative given the jute box MUST be out of sight while navigating the site further?
Photo of Marije

Marije, Official Rep

  • 4636 Posts
  • 237 Reply Likes
If you want music to cover multiple pages or the whole site, then the way you're doing it might be best (I couldn't find an alternative - but anyone is welcome to jump in with suggestions!)

It might also be a better option as visitors can close the music window without closing the whole website.