Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

July 15, 2009 12:00 AM

The Trick to Opening a Top Link Bar URL in a Separate Window

Windows IT Pro
InstantDoc ID #102258
Rating: (8)

In Windows SharePoint Services 3.0 (WSS 3.0) or Microsoft Office SharePoint Server 2007 (MOSS 2007), administrators can easily create a hyperlink in the top link bar by selecting Site Action, choosing Site Settings, clicking Top link bar, and entering a hyperlink (e.g., http://www.officesharepointpro.com). One SharePoint question I'm often asked is how to create a hyperlink that opens a separate Microsoft Internet Explorer (IE) window.

There isn't an out-of-the-box solution for opening a link in another IE window. If you search the Internet, you'll find some solutions such as using Microsoft Office SharePoint Designer 2007 to modify the hyperlink or creating a new custom site definition that provides an "Open in New Window" option. These solutions might not be suitable for administrators who don't have SharePoint Designer 2007 or an in-depth understanding of SharePoint custom site definitions.

After some thought, I realized that you can use a relatively simple browser technique to achieve the desired result. Generally, all browsers let you use JavaScript in the address bar. Thus, you can place the URL in JavaScript command that opens the specified link in a separate window.

For example, suppose you want to open the Office & SharePoint Pro website in a new browser. You'd select Site Action, choose Site Settings, and click Top link bar. Then you'd enter

javascript:window.open("http://www.officesharepointpro.com");void(0);

The Office & SharePoint Pro website will then open in a separate window while the SharePoint site remains open in the original window.

This technique works for both IE and Firefox. However, it might not work in all situations. For example, it won't work for SharePoint sites that have the MOSS publishing feature enabled because the top link bar is replaced with a navigation bar. The navigation bar doesn't let you to enter JavaScript commands. With that said, the navigation bar already has an option that lets you open a link in a new window, so this workaround isn't needed in that situation anyway.

Related Content:

ARTICLE TOOLS

Comments
  • Daniel
    2 years ago
    Sep 09, 2010

    This is great. Do you know how this javascript should be modified to open it in a new tab instead of a new window?

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.