troubleshooting Question

howto reference a file from a URL

Avatar of Mark
Mark asked on
HTMLJSP
4 Comments1 Solution672 ViewsLast Modified:
I want a user to be able to load a file directly from his own drives. I have a button as follows:

<button type=button onclick="location='X:/Archives/Pension Files/SMITH, PATRICK T.pdf'">Click me</button>

Clicking this button gives me a javascript error: Access denied.

I've tried various variations on this theme:

<button type=button onclick="location='FILE:///X:/Archives/Pension Files/SMITH, PATRICK T.pdf'">Click me</button>

<button type=button onclick="location='FILE:///X|/Archives/Pension Files/SMITH, PATRICK T.pdf'">Click me</button>

even:

<button type=button onclick="window.open('X:/Archives/Pension Files/SMITH, PATRICK T.pdf','_BLANK','')">Click me</button>

All give me the same error. This user can open this file using Windows explorer, so I don't think it is a "real" permission issue.

The test html is running under tomcat.

What is my problem?
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros