468,554 Members | 1,643 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,554 developers. It's quick & easy.

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 2503
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by James Kirk | last post: by
9 posts views Thread by Glen | last post: by
2 posts views Thread by mboyda | last post: by
8 posts views Thread by Mantorok | last post: by
4 posts views Thread by =?Utf-8?B?SlA=?= | last post: by
4 posts views Thread by ridgedale | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.