How to open file:/// in Internet Explorer

I have the following in my html:

<a href="file:///X:/Shared/Accounts Pay-Ofc/2006 PERS.pdf">open me</a>

when I hover over the link, I get the hand-pointer, but click does nothing at all. How do I open this file?

WIN7, IE11
LVL 1
MarkAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
That syntax looks correct from the HTML perspective.  Try a different type of file, and see if you can open say a TXT file.  That might point toward a problem with PDF viewing.  Also, your IE settings could be blocking this for some reason.

I'm, also assuming the file exists, have you verified that?

~bp
MarkAuthor Commented:
Tried text file. Does nothing. Any idea on IE settings? Entire html:

<!DOCTYPE html>
<html>
<body>
<a href="file:///X:/Shared/Accounts Pay-Ofc/joe.txt">open me</a>
</body>
</html>
MarkAuthor Commented:
OK, it looks like it's not possible -- it's a security thing: http://stackoverflow.com/questions/18246053/how-can-i-create-a-link-to-a-local-file-on-a-locally-run-web-page

So, I created a link from html folder to the top-level folder where these documents are stored:

documents/receipts -> /mnt/public

where /mnt/public is mapped as the X:\ drive. When I save the user's selected file name I replace the Windows path with the html accessible path (java):

receiptImagePath.replace("X:","documents/receipts").replace("\\","/")

Looks like that's about all I can do. The advantage here is that the document will be accessible by users who do not have the X: drive mapped locally. The downside is that everyone better keep their receipt documents in the X:\ hierarchy.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bill PrewIT / Software Engineering ConsultantCommented:
Interesting, I was able to do a test with a local PDF file and it actually opened it fine in Acrobat Reader (default app for PDF files for me), so I'm seeing slightly different behavior here.  But sounds like you may have a viable workaround there, which is good.

~bp
MarkAuthor Commented:
Bill - interesting that it worked OK for you with a PDF
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
HTML

From novice to tech pro — start learning today.