| Author |
Topic Search Topic Options
|
Misty
Senior Member
Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
|
Post Options
Thanks(0)
Quote Reply
Topic: Redirecting and Opening in a New Window Posted: 15 April 2005 at 2:17pm |
I'd like to try something. I'd like to add target='_blank' to the code so it will open in a new window. But I am not sure how to do this. Here's my current code:
Response.Redirect ("PrayerRequests.aspx")
I'd like for the web page to redirect to this web page. I want the web page to show up in a new window.
|
 |
michael
Senior Member
Joined: 08 April 2002
Location: United States
Status: Offline
Points: 4670
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 April 2005 at 2:41pm |
|
reponse is serverside code has no knowledge of client windows, I would just use some client javascrip block based on your conditions.
|
|
|
 |
Misty
Senior Member
Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 April 2005 at 3:09pm |
|
This will not work for me. Does anyone know of any functions that I could use when I redirect a web page to make it refresh automatically?
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 April 2005 at 3:59pm |
|
Response.Write("window.open('PrayerRequests.aspx','mywindow','width=400,height=200')")
|
 |
Misty
Senior Member
Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
|
Post Options
Thanks(0)
Quote Reply
Posted: 15 April 2005 at 10:34pm |
Mart,
It didn't work. I got "window.open('PrayerRequests.aspx','mywindow','width=400,height=200')
" on the top of my web page. There may be a small error somewhere.
Edited by Misty - 15 April 2005 at 10:41pm
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 April 2005 at 7:28am |
|
Sorry I meant
Response.Write("<script
language=javascript>window.open('PrayerRequests.aspx','mywindow','w idth=400,height=200')</script>")
|
 |
Misty
Senior Member
Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 April 2005 at 1:26pm |
I got the following error message:
Compiler Error Message: BC30648: String constants must end with a double quote.
Source Error:
|
Line 329: lblResultsTitle.Text = "<h3>Thank you for adding your prayer request! </h3>"
Line 330:
Line 331: Response.Write("<script language=javascript>window.open('PrayerRequests.aspx','mywindow','width=400,height=200')</scri pt>")
Line 332:
Line 333: | I tried adding some things, but it still would not work. I am not sure what's wrong.
|
 |
dj air
Senior Member
Joined: 05 April 2002
Location: United Kingdom
Status: Offline
Points: 3627
|
Post Options
Thanks(0)
Quote Reply
Posted: 16 April 2005 at 1:37pm |
|
not sure if its just a formatting error or not but the </script> has a space.
|
 |