Connecting Tech Pros Worldwide Help | Site Map
Reply
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 11th, 2008, 09:27 AM
Newbie
 
Join Date: Mar 2008
Posts: 3
Default window.open in asp

Hi,
Can anyone tell me what is wrong in the following code:

Expand|Select|Wrap|Line Numbers
  1. Response.Write("<script>");
  2. 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");");
  3. 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
Reply
  #2  
Old September 11th, 2008, 03:47 PM
DrBunchman's Avatar
Moderator
 
Join Date: Jan 2008
Location: Winchester, UK
Posts: 926
Default

You've left out a + after screen.width-5 on line 2. It should read:

Expand|Select|Wrap|Line Numbers
  1. 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
Reply
  #3  
Old September 15th, 2008, 07:15 PM
jhardman's Avatar
Moderator
 
Join Date: Jan 2007
Location: logan, utah
Age: 32
Posts: 2,407
Default

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?
Expand|Select|Wrap|Line Numbers
  1. %>
  2. 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+");"
  3. <%
Jared
Reply
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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.
Post your question now . . .
It's fast and it's free

Popular Articles