1,688 articles and 12,612 comments as of Tuesday, September 7th, 2010

Friday, January 30, 2009

Free web part download: Show Icons for External Links

I found the article from Paul Grenier concerning managing external links so compelling that I packed up a web part for use on sites. Here are the requirements:

  • Upload the jQuery library to a document library on the site.
  • Upload the external link icon to your site
  • Import the web part into your SharePoint site.
  • Open the CEWP source editor and change the following to a URL where you have uploaded the jQuery library (this is using the minimal download of jQuery 1.3.1):
    <script type=”text/javascript” src=”[YOUR SITE]/jquery-1.3.1.min.js”></script>
  • Update the location of your image
    .after(”<img src=’[YOUR SITE]/Icon_External_Link.png’ alt=’External Site’ style=’margin-left: 3px;’>”).attr(’target’,'_blank’);

Save your settings and you should have external links with a new image AND they open in a new browser window.

Download these resources: jQueryExternalLinks.zip

-Chris Quick

 

Please Join the Discussion

4 Responses to “Free web part download: Show Icons for External Links”
  1. Walter says:

    This works great for my list, but it causes my Global Navigation to “split” into two lines… any ideas as to how to make the icon fit in the top navigation?

  2. Chris Quick says:

    Walter,

    I can honestly say that I’ve not seen that behavior before. Is your global navigation sites set to an external link (as far as the jQuery web part is concerned)?

  3. Walter says:

    Yes…

  4. JohnnyM says:

    Same here, I also see any hyperlinks that are javascript hyperlinks (to the same hostname) get the icon. (The Top nav Help link and mysite links) and any included Calendars on the page have javascript navigation links Prev Next Month, etc and all the day numbers now get the icons.


Notify me of comments to this article:


Speak and you will be heard.

We check comments hourly.
If you want a pic to show with your comment, go get a gravatar!