Prasad Bolla's SharePoint Blog

Click Here to go through the Interesting posts within my Blog.

Click Here to go through the new posts in my blog.

Monday, February 06, 2012

How to Make Links Open within a New Window in SharePoint Links List AllItems.Aspx Page

Place this script within your SharePoint Links List AllItems.aspx Page.
<script language="javascript" type="text/javascript">
function OpenLinkinNewWindow()
{
    var anchors = document.getElementsByTagName("a");
    for (var x=0; x<anchors.length; x++)
    {
        anchors[x].target="_blank";
    }
}
_spBodyOnLoadFunctionNames.push("OpenLinkinNewWindow");
</script>

No comments:

Post a Comment