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">
   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) 
            var w=window.open(this.href,'_blank'); 
            if(w) { 
              return false 
            return true; 

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


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/

| improve this answer | |

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.