Author |
Topic |
|
Angela French
Starting Member
5 Posts |
Posted - 17 April 2002 : 19:29:51
|
I have two browser windows open on the desktop. One is a full screen, one is a popup.
I have this line of code:
response.redirect ("findClient.asp?error=invalid")
I need it to load in a popup box(findClient.asp) instead of the fullscreen . I need something like a target attribute here, but don't know how to do it inside the response.write.
Can someone please help me, I pulling my hair out on this one.
|
|
Nikkol
Forum Moderator
USA
6907 Posts |
Posted - 17 April 2002 : 19:52:30
|
if you are wanting to do a popup window, it would be easier to use javascript.
Nikkol |
|
|
Nathan
Help Moderator
USA
7664 Posts |
Posted - 17 April 2002 : 20:07:37
|
ASP is server side, you cant influence content in another client side window.
Nathan Bales Snitz Exchange | Do's and Dont's |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 17 April 2002 : 22:47:55
|
The pureists will flame me for this, but it is a solution.
You could of course set a Session variable immediately before the Response.Reidrect and then query this in the page that is redirected to. ie
Session("ErrorVal") = "invalid" Response.Redirect "findclient.asp"
Then in findclient.asp instead of checking the querystring e.g
if Response.Querystring("error") = "invalid" then .....
Check the Session or App variable instead
if Session("ErrorVal") = "invalid" then ...
Don't forget to destroy or reset the Session object if thats what you use (also note Session Variables don't work on the client unless Cookies are enabled)
www.daoc-halo.com |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 18 April 2002 : 10:14:44
|
Gremlin, forgive me if I do't understand your code but how is that going to open the findclient.asp page in the specific window that she wants to open the page in? She wants to open the page using the "target=xxx" attribute.
It seems you are passing the "error=invalid" from the querysting to using a session variable to pass it. But I don't think that's what she wants to do. Passing the variable in the querystring will work ok though.
As Nikkol and Nathan suggested, you can't do that using Response.Write. You can create a javascript function or vbscript function that will open it in the new window. Or you can Response.Write an <a href tag that has the target attribute included.
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 18 April 2002 : 18:56:44
|
Forgive me, I was running late for a meeting and didnt really help you much did I.
Change the Response.Reidrect to the following code
Response.Write "<SCRIPT LANGUAGE=""javascript"">" & vbCrLf Response.Write "<!--" & vbCrLf Response.Write "window.open(""findclient.asp"",""NewWindow"")" & vbCrLf Response.Write "-->" & vbCrLf Response.Write "</SCRIPT>" & vbCrLf
I don't think you can pass the error querystring though in this manner so the Session idea in my previous post helps with this part of it.
www.daoc-halo.com |
|
|
Davio
Development Team Member
Jamaica
12217 Posts |
Posted - 19 April 2002 : 10:39:41
|
It should be able to Gremlin. I don't think you are restricted to what url you can open with using javascript.
«------------------------------------------------------» Want to know when the next version comes out, as soon as possible? Join our Mailing Lists ! |
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 20 April 2002 : 11:44:12
|
Your bound to be right :), I had had a problem passing a string through with a jscript popup type window before so wasn't too sure.
www.daoc-halo.com |
|
|
XavierSlater
Junior Member
United Kingdom
137 Posts |
Posted - 22 April 2002 : 19:06:30
|
I am looking at a similar problem.
I need the following code to open a new window, with the variables passed to it.
quote:
' redirect to new frame window and create a new user login Response.Redirect("frames.asp?chatId=" & p.id) Response.End
This is ConquerChat, but for my site I need it to open in a new window....
Thoughts?
|
|
|
Gremlin
General Help Moderator
New Zealand
7528 Posts |
Posted - 22 April 2002 : 22:37:06
|
Try what I posted above and add the querystring on to it e.g
Response.Write "<SCRIPT LANGUAGE=""javascript"">" & vbCrLf Response.Write "<!--" & vbCrLf Response.Write "window.open(""frames.asp?chatId=" & p.id & """,""NewWindow"")" & vbCrLf Response.Write "-->" & vbCrLf Response.Write "</SCRIPT>" & vbCrLf
www.daoc-halo.com
Edited by - Gremlin on 22 April 2002 22:38:08 |
|
|
|
Topic |
|