User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 423,893 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,185 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 18504 | Replies: 25
Closed Thread
Join Date: Aug 2005
Posts: 100
Reputation: martinkorner is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
martinkorner's Avatar
martinkorner martinkorner is offline Offline
Junior Poster

Help Save Target as...

  #1  
Aug 25th, 2005
How do I make a button that will bring up the download box for something on my website, without the user having to right-click and select "Save Target as..."
Thanks
:lol: Martin :lol:
AddThis Social Bookmark Button
 
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Save Target as...

  #2  
Aug 25th, 2005
You can't. This is fundamental "user interface" 101. A programmer shouldn't attempt to force actions that are historically under user control. Also, what you're attempting violates the browser security model. Just imagine the havoc that would be caused if a web page could "silently download" anything as soon as you browse to it.

I understand you simply want the dialog to pop up, but it's still not allowed.
 
Join Date: Aug 2005
Posts: 100
Reputation: martinkorner is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
martinkorner's Avatar
martinkorner martinkorner is offline Offline
Junior Poster

Re: Save Target as...

  #3  
Aug 26th, 2005
Oh well...
Thanks anyway
 
Join Date: Sep 2005
Posts: 8
Reputation: akadez is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
akadez akadez is offline Offline
Newbie Poster

Solution Re: Save Target as...

  #4  
Sep 27th, 2005
The future is web applications, and needs to provide the same capabilities as a WinForms, if the developer deems so. 90% of my sites are intranet based, so I do not have the fear of anonymous users. If you are using the .NET framework you have some options. You have the ability to create a server-side method or page dedicated to writing the document to the response stream. This will cause the parent page to postback, but it will prompt for download. If you are looking to do this without postback you this can achieved using AjaxPro, http://ajaxpro.schwarz-interactive.de, or other any other Ajax frameworks.
 
Join Date: Aug 2005
Posts: 100
Reputation: martinkorner is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
martinkorner's Avatar
martinkorner martinkorner is offline Offline
Junior Poster

Re: Save Target as...

  #5  
Oct 1st, 2005
What ??? - sorry I'm not with that at all can you explain again please?

Martin

P.S. I wanted to make a link on my website so that when someone clicked on it a .zip file would download - to save them right clicking and clicking on "Save Target as..." etc.
 
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Save Target as...

  #6  
Oct 1st, 2005
It can't be done with HTML, CSS or JavaScript, the topics covered in this forum. What akadez is referring to are some possible techniques in ASP.NET, a server-side language. Daniweb has an ASP.NET forum, if you code in that language.
 
Join Date: Aug 2004
Posts: 49
Reputation: felgall is an unknown quantity at this point 
Rep Power: 5
Solved Threads: 1
felgall felgall is offline Offline
Light Poster

Re: Save Target as...

  #7  
Nov 6th, 2005
Most of your visitors will have .zip files set to offer as download rather than process automatically so you could upload in that format. There is also code that can be put in the .htaccess file to force what you want if your site is running on an apache server.
 
Join Date: Oct 2005
Posts: 31
Reputation: Bomba is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
Bomba's Avatar
Bomba Bomba is offline Offline
Light Poster

Help Re: Save Target as...

  #8  
Nov 9th, 2005
Originally Posted by tgreer
You can't. This is fundamental "user interface" 101. A programmer shouldn't attempt to force actions that are historically under user control. Also, what you're attempting violates the browser security model. Just imagine the havoc that would be caused if a web page could "silently download" anything as soon as you browse to it.

I understand you simply want the dialog to pop up, but it's still not allowed.

Excuse me but the idiot has arrived :o with a question about your answer. Pages seem to download a lot of crap onto my machine when I browse the internet. I have gotten worms, spyware, and other malicious stuff without ever asking for it nor agreeing to it. *thinks I need to hide under the bed now as you are all probably dying laughing* but I really want to know. When you stop laughing at me will you please explain this to me? :rolleyes:
 
Join Date: Dec 2004
Posts: 1,590
Reputation: tgreer is an unknown quantity at this point 
Rep Power: 7
Solved Threads: 35
Colleague
tgreer tgreer is offline Offline
Made Her Cry

Re: Save Target as...

  #9  
Nov 9th, 2005
I don't mind the question, but you're asking it in the wrong spot! Daniweb has a forum specifically for these types of issues: http://www.daniweb.com/techtalkforums/forum64.html

If you'll peruse that forum, I think you'll get the education you seek! If not, feel free to post a new thread there. No one will bite your head off; we try to be a friendly group.
 
Join Date: Feb 2002
Location: Lawn Guylen, NY
Posts: 10,900
Reputation: cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice cscgal is just really nice 
Rep Power: 32
Solved Threads: 118
Admin
Staff Writer
cscgal's Avatar
cscgal cscgal is offline Offline
The Queen of DaniWeb

Re: Save Target as...

  #10  
Nov 9th, 2005
Wait wait wait ... what is being asked is a client-side technology, not server-side at all ... Anything that would interact directly with the web browser - such as opening a dialog menu, would have to be a client-side script.

Server side scripts can interact with files on the server, but you need something client side to interact with files or applications (in this case, the web browser) on the client side of things.

I think this could be accomplished in DHTML (although I'm not sure specifically how to go about it), can it not?
 
Closed Thread

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb JavaScript / DHTML / AJAX Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 4:57 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC