Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a standard SharePoint Links List with entries for each of our file servers as

file:////filesharename

which opens the file share with no problems. The problem I am seeing with this configuration is each time a user clicks on the link, the page with the Links List goes blank. If you click the back button on the browser the screen appears normal.

is there a setting or script that I can utilize to open the links without blanking out the page?

Edit: Here is the solution for opening the links in a new window. I would like to thank SharePoint Lessons Learned for the blog post

<script language="JavaScript">
  _spBodyOnLoadFunctionNames.push("rewriteLinks");

  function rewriteLinks() {
 //create an array to store all
  var anchors = document.getElementsByTagName("a");

  //loop through the array
  for (var x=0; x<anchors.length; x++) {
  //check to see if the current anchor element contain #openinnewwindow
  if (anchors[x].outerHTML.indexOf('#openinnewwindow')>0) {
  //add the [target] attribute and rewrite the [href] attribute
  anchors[x].target = "_blank";
  anchors[x].href = anchors[x].href.replace(/#openinnewwindow/,'');
  }
 }
}
</script>
share|improve this question
add comment

1 Answer

If you dont need to view PDFs in the browser (view in acrobat instead), in the web application general settings (in central admin), make sure the browser file handling is set to strict instead of permissive.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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