Wednesday, February 20, 2013

SharePoint Quick Launch Links That Open In a New Window

Recently I was tasked with adding some links to the quick launch that would open in a new window.  If you've ever added new links to the quick launch you've probably noticed that there is no "Open In New Window" option.  So if you need to add a link to the new Justin Bieber and Selena Gomez fan site and don't want it interfering with your work what are you to do?! Fortunately we can make this happen with a little JavaScript.

Simply navigate to Site Settings -> Quick Launch (under Look and Feel) -> New Navigation Link.

Using the following as your URL you can make this link open in a new window:

javascript:void(window.open('http://www.cnn.com'));
You can see this here:

That's it!  Your link will now appear in the quick launch and will open in a new window!  One thing to note is the single quotes around the URL.  If you use double quotes it will not work, so keep them single!

Enjoy!

4 comments:

  1. Just what I needed. JavaScript, making life easier. Thanks.

    ReplyDelete
  2. Not Working for me. Comes back with "Sorry, Something went wrong. An Unexpected error has occurred". Any Ideas

    ReplyDelete
    Replies
    1. Seems an issue in SP2013. I didn't find a solution yet

      Delete