473,503 Members | 1,643 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How do I multiple tasks once the user click my download button.

15 New Member
Dear friends,

I have a website that sells software. In my download page I have a
"download" button that once the user clicks it open the windows wizard to
/download/save/cancel the software. So far so good.

The download itself is down using the response.redirect (url of the file to download),
e.g. response.redirect("assets/setup.exe")

My question is how do i also redirect the user to a 'thank you' page once they clicked the "download" button automatically.

once the redirect take place to bring the download wizard it seem that I have lost
the option to do an additional redirect.

Help is appreciated.
Oct 26 '09 #1
6 2362
jhardman
3,406 Recognized Expert Specialist
There are a couple ways to do this, but I haven't seen a really standard solution. One that I do see is go to a thank you screen which has a javascript download function. Another option is to go to a framed page and have the frame handle the download.

Jared
Oct 27 '09 #2
vstud70
15 New Member
Hi jhardman,

I was looking at something like microsoft doese when you click their download button, see:
http://www.microsoft.com/downloads/d...displayLang=en

in any case at the end of my thankyou.htm page I inserted the js:

<SCRIPT language="JavaScript">
document.location='/Assets/setup.exe'
</SCRIPT>

It worked fine however when I run the page the browser will block the download , IE will say:
"In order to proect your computer Internet Explorer blocked the download.. click here for options.."

I'm not trying to force the download however I wonder if there is better way just to get the download-wizard w/o going thru the browser yellow-block line.

Regards
Avi
Oct 28 '09 #3
jhardman
3,406 Recognized Expert Specialist
I'm afraid that is IE's default behavior, they have been highly criticized for allowing too many safety workarounds, and this is their compromise. How does firefox handle it?

Jared
Oct 28 '09 #4
vstud70
15 New Member
firefox didn't bother me with the block, it just prompted me with the download wizard as it should. Once you get the wiz the customer can select 'cancel' if he is not sure about the download.

There must be a way around this hurdle, as Microsoft itself implemented it, see below link:
http://www.microsoft.com/downloads/d...displayLang=en

I wonder how...
Oct 28 '09 #5
GazMathias
228 Recognized Expert New Member
Hi,

I am a big fan of jQuery.

In the below example, when the user clicks Download, the download begins and a function is fired to replace the content of a div with something else (rather than redirecting). You can use jQuery's AJAX functions to retrieve html from another page if you want.

So when the page loads, it displays "Download a file!", but when the link is clicked it displays "Thanks for downloading!".

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script src="inc/jquery.js"></script>
  4. <script type="text/Javascript">
  5. $(document).ready(function() {
  6.  
  7.         $("a#download").click(function() {
  8.             $("#content").html("Thanks for downloading!");
  9.         });
  10. });
  11. </script>
  12. </head>
  13. <body>
  14. <div id ="content">
  15. Download a file!
  16. </div>
  17. <br />
  18. <a id="download" href="somefile.zip">Download Now!</a>
  19. </div>
  20. </html>
  21. </body>
  22.  
Gaz.
Nov 2 '09 #6
Markus
6,050 Recognized Expert Expert
@vstud70
You can bet your lucky stars that Microsoft's IE will have Microsoft's websites flagged as 'safe'.
Nov 2 '09 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
3158
by: Sugapablo | last post by:
Is there a way where an end user can download multiple files with one click? I have a database table that can return between 1 and 12 different filenames (JPGs). I'd like to have a single...
5
5444
by: Ron Brennan | last post by:
Good afternoon. The entire task that I'm trying to achieve is to allow a user to browse and upload multiple files simultaneously, hiding the Browse button of <input> tags of type="file" and...
8
2194
by: Gaetan | last post by:
hi i have 2 classes A1 and A2 implementing a problem with 2 different ways i also have 2 other classes X1 and X2 implementing an other problem i need classes that provide A1+X1 methods,...
8
5412
by: Lee | last post by:
Hi,I'm trying to have a button that fires a click event only once. What is the best way to do so that after the first button click, any the following clicks will be ignored.
4
5014
by: Diane Selby | last post by:
Hi- I am developing an ASP.NET application that can take a few seconds to process the request from the user. We are looking for a client-side solution that will prevent users from resubmitting...
2
1473
by: RJN | last post by:
Hi I need help in allowing the user to download multiple files at once. User will be displayed a grid on the browser which will list the various files available on the web server for download...
5
3660
by: Stanav | last post by:
Hello all, Thanks in advance for any replies... Now, my question is: Is it possible to do a multiple files download for a single response event on an aspx page? If there is, please give me some...
7
3085
by: Siv | last post by:
Hi, I have an MDI application that uses a generic "ShowPage" routine in a module that is called when I want to display a child form. The basic idea is that in the module I have declared each form...
9
3164
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.