 | 
September 11th, 2008, 09:27 AM
| | Newbie | | Join Date: Mar 2008
Posts: 3
| | window.open in asp
Hi,
Can anyone tell me what is wrong in the following code: - Response.Write("<script>");
-
Response.Write("window.open("http://111.111.111.111:8000/Pages/ValidateUser.aspx?JVId=PW0000001&SessionId=1000&IsAdmin=Y&RoleName=Self","scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,dependent=no,fullscreen=no,status=yes,left=0,top=0,height=" +screen.height-60 + ",width="+screen.width-5");");
-
Response.Write("</script>");
the IP address is of course a dummy.But its a real url i am working on.I keep getting this error
Error Type:
Microsoft JScript compilation (0x800A03EE)
Expected ')'
Last edited by DrBunchman; September 11th, 2008 at 11:59 AM.
Reason: Added [CODE] Tags - Please use the # button
| 
September 11th, 2008, 03:47 PM
|  | Moderator | | Join Date: Jan 2008 Location: Winchester, UK
Posts: 926
| |
You've left out a + after screen.width-5 on line 2. It should read: - Response.Write("window.open("http://111.111.111.111:8000/Pages/ValidateUser.aspx?JVId=PW0000001&SessionId=1000&IsAdmin=Y&RoleName=Self","scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,dependent=no,fullscreen=no,status=yes,left=0,top=0,height=" +screen.height-60 + ",width="+screen.width-5+");");
Hope this helps,
Dr B
| 
September 15th, 2008, 07:15 PM
|  | Moderator | | Join Date: Jan 2007 Location: logan, utah Age: 32
Posts: 2,407
| |
There are also too many quote marks - always a hard problem when you need to print quote marks. There are a couple ways to handle this problem. Can you try this? - %>
-
window.open("http://111.111.111.111:8000/Pages/ValidateUser.aspx?JVId=PW0000001&SessionId=1000&IsAdmin=Y&RoleName=Self,scrollbars=yes,resizable=yes,toolbar=no,location=no,directories=no,dependent=no,fullscreen=no,status=yes,left=0,top=0,height=" +screen.height-60 + ",width="+screen.width-5+");"
-
<%
Jared
|  | | Thread Tools | Search this Thread | | | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | | | | What is Bytes?
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 204,687 network members.
|