| 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
Posted: 16 April 2005 at 1:48pm |
dj air wrote:
not sure if its just a formatting error or not but the </script> has a space.
|
There's actually no space in script. I am not sure why it showed space in the error message above. This was not what I saw in the error message.
Mart wrote:
Sorry I meant
Response.Write("<script language=javascript>window.open('PrayerRequests.aspx','mywindow','w idth=400,height=200')</script>")
| | |
I forgot to let you know that I already have Javascript code in the ASP.Net web page. The code is:
<SCRIPT LANGUAGE=JAVASCRIPT> <!-- //--------------------------------------------------------------- // name: OpenNewWindow(destination) //--------------------------------------------------------------- function OpenNewWindow(destination) { //Note: be sure NOT to have spaces before or after the commas in the 'width... part of the //open method newWindow = window.open(destination, 'win1', '') } // --> </SCRIPT>
Edited by Misty - 16 April 2005 at 2:45pm
|
 |
Misty
Senior Member
Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 April 2005 at 1:21pm |
I have tried changing the code many times. I am still getting an error message. You can see a copy of my error message below. Can someone please help me with this code? Or maybe you could show me how to modify this code to work with target_blank.
Compiler Error Message: BC30648: String constants must end with a double quote.
Source Error:
|
|
Line 313: lblResultsTitle.Text = "<h3>Thank you for adding your prayer request! </h3>" Line 314: Line 315: Response.Write("<script language=javascript>window.open('PrayerRequests.aspx','mywindow','status=no,toolbar=no,scrollbars =yes,resizable=yes,width=400,height=200,top=0,left=0');</script>") Line 316: Line 317: |
|
 |
Mart
Senior Member
Joined: 30 November 2002
Status: Offline
Points: 2304
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 April 2005 at 2:31pm |
|
This should work
Response.Write("<")
Response.Write("script language=javascript>window.open('PrayerRequests.aspx','mywindow','status=no,toolbar=no,scrollbars
=yes,resizable=yes,width=400,height=200,top=0,left=0');</")
Response.Write("script")
Response.Write(">")
the problem is that you are probably using inline code, and you cannot
have a <script> or </script> anywhere inside a <script
runat="server"> block so you have to replicate it by doing it like
that
|
 |
Misty
Senior Member
Joined: 06 February 2002
Location: United States
Status: Offline
Points: 711
|
Post Options
Thanks(0)
Quote Reply
Posted: 18 April 2005 at 4:13pm |
Mart wrote:
This should work
Response.Write("<") Response.Write("script language=javascript>window.open('PrayerRequests.aspx','mywindow','status=no,toolbar=no,scrollbars
=yes,resizable=yes,width=400,height=200,top=0,left=0');</") Response.Write("script") Response.Write(">")
the problem is that you are probably using inline code, and you cannot have a <script> or </script> anywhere inside a <script runat="server"> block so you have to replicate it by doing it like that
|
Thank you for your help! It finally worked.
|
 |