Open New Window and ASP .NET Style Question

  • Thread starter Thread starter jm
  • Start date Start date
J

jm

I wanted to do something simple. I wanted to open a new window with a
button. Went around the world on Google and found:



Dim endStr As String = "</"
Dim strJScript As String

strJScript = "<script language=""JavaScript"">"
strJScript += "<!-- " + vbCrLf
strJScript += "window.open
(""AddRowCall.aspx"",""myWindow"",""top=0,left=0,width=790,height=500,buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no"");"
+ vbCrLf
strJScript += "// -->"
strJScript += endStr + "script>"

Page.RegisterClientScriptBlock("clientScript", strJScript)


Is this the way I am supposed to do this? Is there something wrong
with just creating a regular old html button (I had wanted the
asp:button, but see no benefit) and some javascript in the page? Not
to mention, this doesn't work; it just never fires. Thanks.
 
Do not mix the scripts, You have specified Javascript as
the script language, and you asre also using VB constant
vbcrlf. if you mix the scripts the function will not work.
 
Back
Top