Print Page | Close Window

open a new window

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=7271
Printed Date: 31 March 2026 at 4:39pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: open a new window
Posted By: alex21
Subject: open a new window
Date Posted: 14 November 2003 at 8:39am

Hello!

I do not know how to do that maybe some1 know

<%
If Request.QueryString("open")="window" Then
Response.Redirect("window.asp")      ;  - I need to open window in terget=_blank (but I do not know how to write this ASP script)
End If
%>
<a href="?open=window">open new window</a>

Plz help me!

Thx




Replies:
Posted By: michael
Date Posted: 14 November 2003 at 9:30am
target is client side, asp is server side so you will have to mix it:
<%
If Request.QueryString("open")="window" Then
    url = "window.asp"
    response.write("<script>" & vbCrLf)
    response.write("window.open('" & url & "');" & vbCrLf)
    response.write("</script>")
End If
%>
<a href="?open=window">open new window</a>


-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: alex21
Date Posted: 15 November 2003 at 4:06am
Originally posted by michael michael wrote:

target is client side, asp is server side so you will have to mix it:
<%
If Request.QueryString("open")="window" Then
    url = "window.asp"
    response.write("<script>" & vbCrLf)
    response.write("window.open('" & url & "');" & vbCrLf)
    response.write("</script>")
End If
%>
<a href="?open=window">open new window</a>

Thx

And how to open the window in _parent or in _mainFrame???




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net