How to redirect after the download starts

G

Guest

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.
 
W

William F. Robertson, Jr.

You probably will have to use window.open( '' ) to start the download, then
in your parent window, redirect to the congratulations page.

bill
 
G

Guest

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 said:
You probably will have to use window.open( '' ) to start the download, then
in your parent window, redirect to the congratulations page.

bill
 
W

William F. Robertson, Jr.

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 said:
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.
 
G

Guest

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top