G
Guest
I have a main web form, "main.aspx" with one login-button. I'd like to open a 2nd form "frm_activity.aspx" in a separate browser window using a client-script upon clicking the login-button from main form
Some Code from "main.aspx.vb"..
Private Sub btn_Login_Click(...
if Not IsClientScriptBlockRegistererd( "OpenW" ) the
Dim DQ As Char = Char(34
Dim scriptString As String = "<script language=JavaScript>
scriptString &= "window.open(" & DQ & "frm_activity.aspx" & D
scriptString &= "," & DQ & "_blank" & DQ & ");
scriptString &= "</script>
RegisterClientScriptBlock( "OpenW", scriptString
end i
End Su
Question1: The 2nd browser window is opened - but is not the focus window. The focus remains with the main form. What must I do to ensure the focus is on the 2nd browser window, i.e., "frm_activity.aspx"
Question2: If I wanted to dispose of the first browser window - once the 2nd browser window is opened, how would I do this?
Some Code from "main.aspx.vb"..
Private Sub btn_Login_Click(...
if Not IsClientScriptBlockRegistererd( "OpenW" ) the
Dim DQ As Char = Char(34
Dim scriptString As String = "<script language=JavaScript>
scriptString &= "window.open(" & DQ & "frm_activity.aspx" & D
scriptString &= "," & DQ & "_blank" & DQ & ");
scriptString &= "</script>
RegisterClientScriptBlock( "OpenW", scriptString
end i
End Su
Question1: The 2nd browser window is opened - but is not the focus window. The focus remains with the main form. What must I do to ensure the focus is on the 2nd browser window, i.e., "frm_activity.aspx"
Question2: If I wanted to dispose of the first browser window - once the 2nd browser window is opened, how would I do this?