473,233 Members | 1,544 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

How to redirect after the download starts

Hi,

I am having a requirement where in user can click on a link and the download
popup appears and then user should be redirected to a congratulations page.

We didn't bother whether the download is successful or not but as soon as
user clicks on the download link the popup appears, and then the user should
be directed to the congratulations page.

I have written the standard code to download the file but after that i am
unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh
Nov 19 '05 #1
4 2664
You probably will have to use window.open( '' ) to start the download, then
in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
Hi,

I am having a requirement where in user can click on a link and the download popup appears and then user should be redirected to a congratulations page.
We didn't bother whether the download is successful or not but as soon as
user clicks on the download link the popup appears, and then the user should be directed to the congratulations page.

I have written the standard code to download the file but after that i am
unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh

Nov 19 '05 #2
Hi William,

Thanks for your sugggestion and its working too but i have one question
related to this suggestion and i guess you probably expecting it!

The thing is what about the window that gets opened up, do we have any way
to hide that window? Because for users its difficult to accept that a window
appears just becuase they are downloading something.
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
You probably will have to use window.open( '' ) to start the download, then
in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
Hi,

I am having a requirement where in user can click on a link and the

download
popup appears and then user should be redirected to a congratulations

page.

We didn't bother whether the download is successful or not but as soon as
user clicks on the download link the popup appears, and then the user

should
be directed to the congratulations page.

I have written the standard code to download the file but after that i am
unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh


Nov 19 '05 #3
When you open a new window to another address, it will open the new window.
When the only thing sent by the server to the "new" browser window, is a
downloaded file, on my Windows 2000 Client, it basically closes out the
window and switches to a dowload dialog.

You will probably want to test this, but I believe it should work.

bill

"Hitesh" <Hi****@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
Hi William,

Thanks for your sugggestion and its working too but i have one question
related to this suggestion and i guess you probably expecting it!

The thing is what about the window that gets opened up, do we have any way
to hide that window? Because for users its difficult to accept that a window appears just becuase they are downloading something.
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
You probably will have to use window.open( '' ) to start the download, then in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
Hi,

I am having a requirement where in user can click on a link and the

download
popup appears and then user should be redirected to a congratulations

page.

We didn't bother whether the download is successful or not but as soon as user clicks on the download link the popup appears, and then the user

should
be directed to the congratulations page.

I have written the standard code to download the file but after that i am unable to redirect the user to another page.

Can anybody help me out to achive the same.

--
Thanks
Hitesh


Nov 19 '05 #4
Hi William,

Did you mean to say that the window never appears up on your client. On my
side it apears and be there untill the user made their choice (open, save,
cancel) about the download. Once they made the choice the window gets closed
automatically.

What i am looking for is there any way so that the window never appears. Is
this possible from your last answere it seems that you are not getting the
window at all and there is not other thing on that page except the download
code.

Please share your thoughts on this. And till now what ever you are
suggesting is taking me into the right direction so thanks for it!
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
When you open a new window to another address, it will open the new window.
When the only thing sent by the server to the "new" browser window, is a
downloaded file, on my Windows 2000 Client, it basically closes out the
window and switches to a dowload dialog.

You will probably want to test this, but I believe it should work.

bill

"Hitesh" <Hi****@discussions.microsoft.com> wrote in message
news:7D**********************************@microsof t.com...
Hi William,

Thanks for your sugggestion and its working too but i have one question
related to this suggestion and i guess you probably expecting it!

The thing is what about the window that gets opened up, do we have any way
to hide that window? Because for users its difficult to accept that a

window
appears just becuase they are downloading something.
--
Thanks
Hitesh
"William F. Robertson, Jr." wrote:
You probably will have to use window.open( '' ) to start the download, then in your parent window, redirect to the congratulations page.

bill
"Hitesh" <Hi****@discussions.microsoft.com> wrote in message
news:8C**********************************@microsof t.com...
> Hi,
>
> I am having a requirement where in user can click on a link and the
download
> popup appears and then user should be redirected to a congratulations
page.
>
> We didn't bother whether the download is successful or not but as soon as > user clicks on the download link the popup appears, and then the user
should
> be directed to the congratulations page.
>
> I have written the standard code to download the file but after that i am > unable to redirect the user to another page.
>
> Can anybody help me out to achive the same.
>
> --
> Thanks
> Hitesh


Nov 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Trigger | last post by:
I'm trying to build a tray for users to download their selected items. I was wondering if anyone knows how to response.redirect a file (for the user to download) and check to see if the download...
3
by: James Kirk | last post by:
The script below allows me to link to a file and as the user clicks to download, the 'File Download' windows appears as normal, and the user can download... The original page is then redirected...
9
by: Glen | last post by:
I'm writing a console utility to download specific files from web sites based on the command line options. In most cases, I can trap the 404 error when the file isn't available because the...
2
by: mboyda | last post by:
I have a block of code that useses outputstream to save a pdf to a client computer. It prompts the user with the save dialog, works great but the response finishes after the download completes. ...
8
by: Mantorok | last post by:
Hi all When I start a new thread that tries to call: HttpContext.Current.Response.Redirect() It fails as Current returns null, is there anyway to access the current httpcontext from within...
12
by: JenHu | last post by:
Hi all, I have to ask a stupid question: In asp.net, I use Response.Redirect ("Main.aspx") to redirect pages, but what is the syntax of redirect forms in vb.net windows application? I have...
4
by: =?Utf-8?B?SlA=?= | last post by:
All the sudden my app has started to loose Session values after a Response.Redirect to another page in the same project. Ive read several post about setting the Terminate Boolean to false to solve...
4
by: ridgedale | last post by:
I wonder if anyone can help me out with this. I am sending the user to a download page where when they click on the download button the file is downloaded and then I want the user redirected after...
9
by: Matt Nunnally | last post by:
I have a form which allows the user to download a simple text file. They click on the download button and it brings up the "Save As" dialog. Once they save the file, I want them to be redirected to...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.