hpl
Aug 11th, 2005, 12:54 AM
When I use the code below my Windows XP OS blocks the new window. Is there a way to prevent this?
The code is written in vb.net:
Sub openNewWindow()
Dim strScript As String = ""
strScript = "<script>"
strScript = strScript & "var winName= '';"
strScript = strScript & "var w;"
strScript = strScript & "var winFeatures = 'width=520,height=640,top=0,left=0,status,scrollbars';"
strScript = strScript & "var winURL = 'http://www.vbdotnet.dk/abbreviations.aspx';"
strScript = strScript & "w = window.open(winURL,winName,winFeatures);"
strScript = strScript & "</script>"
'Allows the alert box to be shown without wiping the controls off the page.
Page.RegisterStartupScript("ClientScript", strScript)
End Sub
The code is written in vb.net:
Sub openNewWindow()
Dim strScript As String = ""
strScript = "<script>"
strScript = strScript & "var winName= '';"
strScript = strScript & "var w;"
strScript = strScript & "var winFeatures = 'width=520,height=640,top=0,left=0,status,scrollbars';"
strScript = strScript & "var winURL = 'http://www.vbdotnet.dk/abbreviations.aspx';"
strScript = strScript & "w = window.open(winURL,winName,winFeatures);"
strScript = strScript & "</script>"
'Allows the alert box to be shown without wiping the controls off the page.
Page.RegisterStartupScript("ClientScript", strScript)
End Sub