0

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>

1 Answer 1

0

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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