1

When I am in a sharepoint list. How can I make it so that any links in the list open outside? Thanks!

I have this script to open files in a new location.

<script language="javascript" type="text/javascript">
    _spBodyOnLoadFunctionNames.push("OpenPDFInNewWindow()");
   function OpenPDFInNewWindow() 
    {      
      var aAllLinks = document.links;     
      for(var i=0;i<aAllLinks.length;i++) 
      { 
         var oA = aAllLinks[i]; 
         var sHREF = oA.href.toLowerCase(); 

         if(sHREF.indexOf(".jpg") > 0 || sHREF.indexOf(".pdf") > 0) 
         { 
            oA.onclick=function() 
            { 
            var w=window.open(this.href,'_blank'); 
            if(w) { 
              w.focus(); 
              return false 
            }; 
            return true; 
          } 
         } 
      } 
    } 
    </script>
1

check this blog, mentioned couple of ways to acheive this goal. This is true but valid so far for 2013.

http://www.sharepointdiary.com/2011/02/sharepoint-link-list-open-in-new-window_21.html

But may be you will see this issue due to 2013 minimal download strategy . May be you need to disable it.

Check this solution: http://www.siolon.com/blog/sharepoint-2013-site-navigation-does-not-open-in-new-window/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.