|
-
Jun 20th, 2001, 05:03 AM
#1
Thread Starter
Hyperactive Member
Response.redirect
Hello,
I want to give the user the opportunity to register for using my website. Here is the code which I want to use. My question is - how can I open a NEW(!!) screen if I see that the user has NOT registered before?? Needless to say, the response.redirect target=blank - does not work!!
Code:
<%
dim checkCookie
checkCookie = request.cookies("pq")
if checkCookie = "" then
response.redirect("register.asp target=_blank")
end if
Thanks,
T
-
Jun 20th, 2001, 05:18 AM
#2
Hyperactive Member
You'll need some Javascript first off.
<script language="JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features)
{ //v2.0
window.open(theURL,winName,features);
window.blur();
}
//-->
</script>
Then in your asp code
If checkCookie="" then
MM_openBrWindow('logon.asp','windowname','status=yes,width=795,height=595')
End if
Not 100% sure if this is the right way of calling Javascript from within ASP code, I use this mainly in BODY OnLoad=""
Hope this helps though
Thanks in advance for any help provided.
VB 6 Enterprise Edition SP4
ADO, SQL 7/2000, ASP and some JavaScript

>> Life goes on, but for how long? <<
If you can smile when things go wrong, you have someone in mind to blame
-
Jun 20th, 2001, 06:12 AM
#3
Black Cat
Not 100% sure if this is the right way of calling Javascript from within ASP code
You can't call client-side javascript from server-side ASP. You would have to write the javascript code to the client.
More like this:
VB Code:
If checkCookie="" then
Response.Write "<body onload='
MM_openBrWindow('logon.asp','windowname','status=yes,width=795,height=595')'"
End if
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
Jun 20th, 2001, 01:28 PM
#4
Thread Starter
Hyperactive Member
Thank you
Thanks guys, it works great!!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|