Author |
Message |
howard
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Aug 23, 2006
Posts: 32
|
Posted:
Tue Dec 19, 2006 12:11 am |
|
Anybody know how I could force my users to save a file to their desktop instead of opening it in the browser? I'm specifically referring to pdf documents. Thoughts?
Below is an example of the code I'm using
Code:<tr>
<td width="25%"><div align="center">May/June</div></td>
<td width="50%"><div align="center">Passing of a Friend <br>Veteran's Day 2005<br>OHA Board of Director Election<br>Unit News </div></td>
<td width="25%"><div align="center"><a href="/modules/Chronicles/pdfs/2006/mayjune06.pdf">LINK</a></div></td>
</tr>
|
Thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
Sells PC To Pay For Divorce
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined:
Posts: 5661
|
Posted:
Tue Dec 19, 2006 4:45 am |
|
Quote: | force my users to save a file to their desktop |
Huh?...
with any file offered the person can choose where to safe it.....
im sure you know that...
so what do you mean ? |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
geoff_bell
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Dec 07, 2006
Posts: 41
|
Posted:
Tue Dec 19, 2006 5:38 am |
|
i think howard is referring to the way some documents that the webmaster would prefer visitors to download will open within the web-browser (ie pdf, doc, xls, etc) instead of offering the person the option to "save as".
i don't think i ever came across it myself. i normally just marked the downloads section that the users has to right-click the link and "save as" themselves.
i remember in particular having difficulty with visitors and a download i had that was a jpg. they clicke dthe link and it opened in the browser window and rescaled to fit. i ended up saving it as a pdf, which was alright at the time as acrobat may not have been able to open docs from within the browser enviroment at the time. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 5:45 am |
|
well all of the above only works if the right software is asigned to that file,meaning that its the standard software to open it with...
but preventing the safe as....that would be hard....never realy saw that...
but we also dont know what file / extension he's talking about. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
howard
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 6:46 am |
|
The file I'm referring to is a pdf file, and I don't want to prevent save as, I want to prevent users from opening the acrobat file in their browser.
If I can't do it, thats fine...I was just wondering if anybody knew a way that would make them download it when they click the link. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
manunkind
Client
![](modules/Forums/images/avatars/4720652b44af0a93765cf.jpg)
Joined: Apr 26, 2004
Posts: 368
Location: Albuquerque, NM
|
Posted:
Tue Dec 19, 2006 6:50 am |
|
This is an Operating System function on the client's PC. No amount of PHP or HTML will change that. |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 6:51 am |
|
ah i see...
yes there is such a javascript piece...
its a bit old and i saw that on a mp3 site a few years ago...
the intention was that people had to save as instead of clicking the link...
that worked cause you were forced to use ...save as...
(edit...eh manunkind....it is possible.. ) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
manunkind
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 7:01 am |
|
Javascript and ActiveX were excluded from my statement.
Just keep in mind that more and more people are running without scripting turned on. Client side scripting solutions may be less effective than you think. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 7:22 am |
|
well im talking about a few years ago...then it was more standard like that people had java enabled in most cases.
then its no big deal making a script that instructs a computer that you cant click but have to right click to save as instead.
these scripts were similar to the no right click...
how this all would work 5,6 years later i dont know.... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
manunkind
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 8:17 am |
|
Very true. I guess the effectiveness of something like this would depend on the application of it. For example, I can't remember the username off the top of my head, but there's a member of the boards here who runs a site solely for his family to keep connected. In that case, it would be very trivial to have those users add his site to their Trusted Sites list if they were running IE in "safe mode", or have them allow all scripting for the site if they run Firefox with the NoScript plug-in.
In any event, all scripting like this should have some kind of fallback option for users without scripting turned on. In which case, it defeats the whole purpose of a "functionality limiting" script anyway. Cosmetic eye candy is one thing, but functionality is like a bit....it's either on or off. ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
howard
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 3:33 pm |
|
yeah, I was just wondering if there was an easy way to do it. Evidently there isnt. My client base is going to be a wide variety of users, young to old with a variety of computer experience....so functionality is key.
I'll just put a little note to right click > save as instead of clicking the link. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hitwalker
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Dec 19, 2006 3:34 pm |
|
ill try to see if i can find that code....
if so ill post again.. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|