womp
womp

Reputation: 116977

File:// link doing nothing in all browsers

I have a link being generated that looks like so:

<a target="_blank" title="Test" href="file:///c:/test.xls">Test</a>

This link is inside an iframe.

When I click on it (in any major browser), nothing happens. Fiddler records no traffic. Pasting the URL into the nav bar works fine - the file download box comes up, and I can download the file no problem.

I've tried every variant of the URL structure (correct and incorrect, colons, slashes, backslashes, etc.) that I can think of.

I'm certain that it's some kind of security restriction, but I can't for the life of me find out what it is or how to get around it. I'm feeling pretty foolish at this point. Any simple explanations?

Upvotes: 3

Views: 1488

Answers (2)

Byron Whitlock
Byron Whitlock

Reputation: 53861

Sorry, if you are pulling this page off of a server (acessing it as http://), the security settings won't let you link to local content (acess links as file://). I've had this same problem accessing shared .doc files in a wiki. Never came up with a good solution.

Upvotes: 5

Cullen Walsh
Cullen Walsh

Reputation: 4388

Try a colon instead of a pipe ;)

Upvotes: 0

Related Questions