469,282 Members | 1,977 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

window.open() in HTTP Response/Request?

Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin
Nov 18 '05 #1
5 2207
Perhaps the easiest way to accomplish this is through the
Page.RegisterStartupScript() or one of the similar methods. The MSDN
documentation provides an example.

http://msdn.microsoft.com/library/de...criptTopic.asp

"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #2
Try this code:
RegisterStartupScript("startupScript", "<script
language=JavaScript>window.open('test.aspx','_blan k');</script>")

Here's more info:
http://msdn.microsoft.com/library/de...criptTopic.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #3
Hi

Thanks for your replies.

I had this solution before but the architcture (not functionality) doesn't
work for me.
Is there any way I can do it the way I asked for, no matter how complicated?

I mean there must be a solution to do this using Response/Request?

Thanks for your efforts!

Martin
"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #4
What is it in your architecture that is preventing this solution from
working? Response.Redirect is a server side action that instructs the
client to send another GET request to the server. Opening a new window is a
client side action and therefore cannot be controlled from the server.

"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP12.phx.gbl...
Hi

Thanks for your replies.

I had this solution before but the architcture (not functionality) doesn't
work for me.
Is there any way I can do it the way I asked for, no matter how complicated?
I mean there must be a solution to do this using Response/Request?

Thanks for your efforts!

Martin
"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin


Nov 18 '05 #5
Thank you to everyone for replying. It's solved. See next post about hta.

"Martin Feuersteiner" <th************@hotmail.com> wrote in message
news:ui*************@TK2MSFTNGP12.phx.gbl...
Hi

Sorry, I'm not good in this.
Is there any way to open a new window with code something like the one
below?

Response.Write("_blank")
Response.Write("window.open()")

Thanks for your expertise!
Have a good day!

Martin

Nov 18 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by HarveyB | last post: by
10 posts views Thread by Roland | last post: by
8 posts views Thread by Andy G | last post: by
1 post views Thread by Suedois | last post: by
6 posts views Thread by SAL | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.