1

I am creating a local web portal in my company intranet. In a page I need to give links to some excel sheets in a remote server.

urlFile='file://ed1/cf/a/b/c.xls';
var regRsltLink = $("<a />", {
       href : urlFile,
       text : "heading",
}).appendTo("#legPassRate");

The anchor link appears fine. When I click the link, nothing happens. But when I copy the link address and paste in a new tab and launch it, a file download dialog appears and file downloads fine. Is it possible to initiate a file download dialog when i click the anchor link. I get the following link path when i copy the link address.

file://ed1/cf/a/b/c.xls

Browser : Chrome

kk.
  • 667
  • 1
  • 15
  • 33

1 Answers1

2

For Chrome, Safari and Opera this isn't possible due to their security model. However, there is somewhat of a solution for Chrome in that it's possible but it has two requirements:

  1. You need to get the user to install this Chrome extension
  2. It must be over https://

You will probably encounter the same problem for Firefox since it usually requires LocalLink.

Further reading

ediblecode
  • 11,701
  • 19
  • 68
  • 116
  • It does however work fine on `Internet Explorer` so if that's what your intranet users will be using, then no problem – ediblecode Oct 18 '13 at 15:41