Is there a code that I can use in my web page to cause a txt file (or any file for that matter) to be downloaded vs having it open in a new window when clicked on?
Unless your users are in a trusted app of some sort like an HTA this is unlikely as per the browser security model. An active X control will do it, but not without security warnings jared@aauser.com
I think that should work. Unfortunately, I think certain files are associated with the browser and/or browser plugins, so I don't know if you;ll be able to do anything about those. jared@aauser.com
what kind of file? if the file isn't automatically opened by a program associated with IE, or some of the programs IE can open within itself, it should ask you to save or open.... adam@aauser.com
They are simple readme.txt type of files. But when a user clicks on them, it will open in a new window rather than download. I just would like to trigger that dialog box that asks the user if they want to save or open the file.
Is there no script that will force this to happen?
In a way related to my thread "Script needed...", but in my case, I guess a little more complicated.
If you zip your text file(s), and upload it, then a shift-click on your link should open the default download application!
The same thing would generally happen if you use an .ext (using a binary data type) that has no viewer. But then after the download, the user would have to change it to open it up with his viewer.
Sorry, as I said in my thread, I'm no expert... even more so in Unix. This method usually works with Windows, that's all I can say.
You may want to have a look at this:
Am I missing something in this discussion? All a user has to do is right-click the link to get the options to...
Open
Open in a new window
Save target as
Print target
...and several more options.
What's the fuss?
The fuss... Is that you're not really answering Mary's or my questions(Need script... A challenge for you). Never was inclined to right-click on a link before... On a picture, video or sound... yes! But on a link... na! Thanks for pointing that out... But it doesn't really answer my question or solve my problem!
I'm looking for an automatic script, where the user's participation is the least of my concerns!
Can you find another way to Rome?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.