Results 1 to 5 of 5

Thread: problem with javascript in an asp.net page???

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    michigan
    Posts
    70

    problem with javascript in an asp.net page???

    Code:
    NoRecord &= "PlanID="
    NoRecord &= PlanID
    NoRecord &= "&MinSize="
    NoRecord &= MinSize				  	
    				  
    NewUrl = "http://www.sample.com?" & NoRecord
    winfeatures= "',height=800;width=320;left=100;top=100;locatio=no;menubar=no;resizable=yes;scrollbar=yes;status=no;'"  
    
    NewScript &= "<script language=javascript>"
    NewScript &= "window.open('"& NewUrl "',"," & winfeatures );"
    NewScript &= "</script>"

  2. #2
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    What exactly is your problem?

    I did notice your location=no is missing an 'n', (locatio=no), other than that, are you attempting to open this on form load?

    Then you add an attribute "onLoad=myscript();"

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    Several problems:
    You should use commas instead of semicolons for the parameters.

    You have to pass a null for the second parameter of window.open()

    Your string concatenation is messed up in window.open()

    Your fixed code should look like this:
    PHP Code:
    NoRecord &= "PlanID="
    NoRecord &= PlanID
    NoRecord 
    &= "&MinSize="
    NoRecord &= MinSize                      
                      
    NewUrl 
    "http://www.sample.com?" NoRecord
    winfeatures 
    "height=800,width=320,left=100,top=100,location=no,menubar=no,resizable=yes,scrollbar=yes,status=no"  

    NewScript &= "<script language=javascript>"
    NewScript &= "window.open('" NewUrl "', null, '" winfeatures "');"
    NewScript &= "</script>" 
    Last edited by wey97; Mar 30th, 2004 at 07:54 AM.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Sep 2003
    Location
    michigan
    Posts
    70
    hi nemaroller and wey97 thanks for ur reply guyz...the problem is it says string constants must be closed with double quotes.I tried wey97's code but still it says the same error...

  5. #5
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    You'll have to post your code...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width