• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Downloading only after prompt...

 
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hai All!
Consider this scenario...
I have HTML code to download some PDF file.. And PDF reader is installed in the client machine. Now when i tried to download this pdf on client machine it is directly opening in browser.
Is there anyway that i can control so that system prompts for Downloading before Opening..
This should be generic..That is to say not only for PDF but for all kinds of files..
Any suggestions are appreciable..
Rgds
Manohar
 
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if this will work for you, but we have done it in the past. If you remove the extension of the file, or give it a strange extension (on both the actual physical file to be downloaded and in the HREF of your html code), the browser will usually not know what to do with it and will prompt the user to download. In order to do this though, you should clearly indicate what kind of file you are pointing to so the user knows what he/she is getting.
Hope this helps.
reply
    Bookmark Topic Watch Topic
  • New Topic