Invalid argument.

  • Thread starter Thread starter Mariame
  • Start date Start date
M

Mariame

Hi All,

I have a datagrid in the select button i write the following code:
Response.Write("<script>window.open('new.aspx', New Page',
'top=120,left=200,width=440,height=340,modal=yes,scrollbars=yes');</script>"
)

but it give me this error "Invalid argument."

What is wrong in it????????

Regards
 
Not sure if this is your problem, but there is a missing single quote
inside the 2nd parameter. I think it should be 'New Page'.
 
it doesent really make a difference with putting the single quote in it
Anyone know what could be the cause that fire "invalid argument" in the
following code?
Response.Write("<script>window.open('new.aspx', 'New
page','top=120,left=200,width=440,height=340,modal=yes,scrollbars=yes');</sc
ript>"

Thx in Advance
 
Can you give us a little more code so we can see the context in which this
is being used? The line of code below, by itself, does not cause an error.

Travis Murray
MCSD, MCT
Artiem Consulting, Inc.
http://www.artiem.com
 
i write the following code in the select index change of datagrid :

Private Sub DataGrid1_SelectedIndexChanged(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles DataGrid1.SelectedIndexChanged

Dim x() As String

ReDim x(1)

x(0) = DataGrid1.SelectedItem.Cells(3).Text

dim ticket as integer

ticket = x(0)

Response.Write("<script>window.open('CallBackTrace.aspx', 'Call Back Trace',
'top=120,left=200,width=440,height=340,modal=yes,scrollbars=yes');</script>"
)

End Sub
 
New Page doesn't have matching quotes. But I'll show you a hidden secret

Really, its hidden.
Try this in your event handler:

dim script as string
script = "<script language=""javascript"">window.open
(""url.aspx"",""NewPage"",""top=0,left=0"");</script>"
page.RegisterClientScriptBlock("MyScript",script)

This causes the script block to be inside of the document instead of hanging
out at the top of your page. I know its picky, but it helps you generate
valid html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top