• 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

open file

 
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am writing a webpage using MS frontpage.
I have a hyperlink to another Word file in the same directory.
When I get into this page and click on the hyperlink, browser goes to the word file directly.
Are there anyway to prompt the user an option
"save to disk" or "open the file"?
I don't know whether I have posted this msg @ the right page. But thanks!
 
hired gun
Posts: 250
MS IE Oracle Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope that this will work for you. I found it here. This is client side vb script. You can wrap it in a function and then add it to your <a href> tag as an onClick event.

[ May 03, 2003: Message edited by: John Hembree ]
 
John Hembree
hired gun
Posts: 250
MS IE Oracle Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This one works, this would be a lot simpler. It's from here.
Multipurpose Internet Mail Extensions (MIME) is a wonderful thing,
allowing your Web browser to automatically display content of many
different formats natively within the browser window. However,
sometimes, you may want users to download this content to their
client computer rather than simply viewing it in the browser. But
how do you override the browser's determination to render known
MIME types itself? The answer is to use a content disposition
header in your Web page.
Suppose you've written an ASP page that contains a link to a known
MIME type, but you want the user to download the file instead of
viewing it. Here's an example:

Then substitute the actual filename and extension, and it's as good as done. When your users click on the link, they'll immediately see the download dialog box instead of the file's contents.
[ May 04, 2003: Message edited by: John Hembree ]
 
Jackie Wang
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks,
however, if I wanna include this script in a simple html page, is that possible?
Thanks!
 
reply
    Bookmark Topic Watch Topic
  • New Topic