Computing.Net > Forums > Web Development > HTML link to a file in the users PC

HTML link to a file in the users PC

Reply to Message Icon

Original Message
Name: remgu
Date: October 16, 2006 at 08:26:53 Pacific
Subject: HTML link to a file in the users PC
OS: Windows XP SP2
CPU/Ram: P4 3.4Ghz 1GB Ram
Model/Manufacturer: Clone
Comment:

Hi, how can I create a hyperlink to a file not on the webserver but on the user's PC? The users of the webpage will all have access to a network drive that contains a certain file that they need to open when clicking on the link. Is there a special character that I need to put at the start of the link in order for the browser to know not to link to the webserver?

Thanks
REMGU

Thanks,
REMGU


Report Offensive Message For Removal

Response Number 1
Name: Laler
Date: October 16, 2006 at 08:52:00 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

hi, take a look at this thread

---
Fubar


Report Offensive Follow Up For Removal

Response Number 2
Name: Laler
Date: October 16, 2006 at 08:55:14 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

this part:

[a href="file:///C|\server\games.zip"]

so the computer will look at the file directly from their system, no longer using the webserver... but you must sure that location is accessible by each of the computer in the intranet.

-----

You can test calling the file by typing something like file:///C:\path\filename and see if it works, then that's the link... Assuming the file position is exactly the same on your visitor's PC.

---
Fubar


Report Offensive Follow Up For Removal

Response Number 3
Name: Laler
Date: October 16, 2006 at 08:59:40 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

Response #4 is not related to that thread 0_o

---
Fubar


Report Offensive Follow Up For Removal

Response Number 4
Name: remgu
Date: October 16, 2006 at 12:24:25 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

Thanks for the syntax. I have tried it and it works straight from my pc but it doesn't want to work from the sharepoint server that I put it in.

This is what I have:

Clicking here

Thanks,
REMGU


Report Offensive Follow Up For Removal

Response Number 5
Name: Michael J (by mjdamato)
Date: October 16, 2006 at 13:00:27 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

When yousay that it works from your machine I am assuming that you are running the html file from your machine as well - i.e., not running it through the web server.

I have a feeling that there may be a security constraint to prevent opening a iile on the user's computer directly. This makes sense as someone could just put links to run a program on a users computer and that would not be a good thing.

I tested the parameters above as well as just putting the direct location to the file ("c:\path\file") and neither would open the file. But, the link is correct because I can right-click and save as the files.

Michael J


Report Offensive Follow Up For Removal


Response Number 6
Name: remgu
Date: October 16, 2006 at 13:10:37 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

You are probably right. I've noticed a lot of security constraints in our Sharepoint. I'll just have to look for another way. Thanks for the info.

PS. I meant to have the syntax show above, sorry.

Thanks,
REMGU


Report Offensive Follow Up For Removal

Response Number 7
Name: Laler
Date: October 16, 2006 at 14:46:47 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

Your post made me do the test Michael, I put:

Test

in a .html file, save it, open it, click the link, and it pops the "run" or "save as" box on IE, but only "save as" on Firefox.

But after I upload it to the internet, it didn't work, unclickable :|

---
Fubar


Report Offensive Follow Up For Removal

Response Number 8
Name: Michael J (by mjdamato)
Date: October 16, 2006 at 14:59:57 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

Right, it didn't work for me when the page was uploaded to the internet as a dirtect link, but I was able to right-click save as. But what good is that since you already have the file on your machine?

I'm sure there is a way to do this, but it may require adjusting the security settings.

Michael J


Report Offensive Follow Up For Removal

Response Number 9
Name: remgu
Date: October 16, 2006 at 17:48:18 Pacific
Subject: HTML link to a file in the users PC
Reply: (edit)

Yeah, I'll look at it some more. At least I now know the syntax.

Thank you.

Thanks,
REMGU


Report Offensive Follow Up For Removal






Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: HTML link to a file in the users PC

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software