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
For
Chrome
,Safari
andOpera
this isn't possible due to their security model. However, there is somewhat of a solution forChrome
in that it's possible but it has two requirements:https://
You will probably encounter the same problem for
Firefox
since it usually requiresLocalLink
.Further reading