Response.Redirect with specifing new window properties

M

Mike

How can I use response.redirect and also set properties for the new window
such as, width=760, toolbar=no, scrollbar=yes, statusbar=no, etc....?

I need to do it on the following line:

Response.Redirect"admin/view/wb_a_client_list.asp"

Thanks,

Mikeal
 
J

Jim Buyens

-----Original Message-----
How can I use response.redirect and also set properties
for the new window such as, width=760, toolbar=no,
scrollbar=yes, statusbar=no, etc....?

I need to do it on the following line:

Response.Redirect"admin/view/wb_a_client_list.asp"

Try the window.open method described at:

http://msdn.microsoft.com/workshop/author/dhtml/reference/m
ethods/open_0.asp

Here's an example:

<script>
window.open("admin/view/wb_a_client_list.asp",
null, "height=500, width=760, status=yes, toolbar=no,
menubar=no, location=no");
</script>

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
M

Mike

Jim,

I need to use the response.redirect within the asp tags <% %>. How can I
use the <script> </script> statements inside the asp tags?

I cannot get it to work.

Mikeal
 
T

Thomas A. Rowe

You can't. Response.Redirect uses the same browser window as the page it is
on. Re-think why you need to open a new window or run the entire process in
a popup window, etc.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
M

Mike

Is there any way to use window.close() without it telling you that the web
page is trying to close the window?

Mikeal
 
T

Thomas A. Rowe

Only if you generate the window via JavaScript.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, Forums, WebCircle,
MS KB Quick Links, etc.
==============================================
 
C

chris leeds

only if the window was opened by/from a "parent". if you try to close the
parent that box may pop-up. I believe it's a browser setting.
 
J

Jim Buyens

Mike said:
Jim,

I need to use the response.redirect within the asp tags <% %>. How can I
use the <script> </script> statements inside the asp tags?

I cannot get it to work.

I call this the "message in a bottle" technique. ASP code can't
control the browser window directly, but it can operate the browser
remotely by sending it a script. Here's an example:

<%
If doWhatever = "yes" Then
%>
<script>
window.open("admin/view/wb_a_client_list.asp",
null, "height=500, width=760, status=yes, toolbar=no,
menubar=no, location=no");
</script>
<%
End If
%>

As to closing the original window, I can't imagine why you'd want to
do that. I mean, here's the visitor, surfing along, having a good
time, and all of a sudden you replace his browser window with one that
can't surf on to other pages (no address bar). I would hate a site
that did that. Actually, I would probably right-click the task bar
icon, close the window, restart IE, and never visit that site again.

Why are you trying to do this, anyway?

Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 

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

Top