window.open(...)

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 the main form

Some code from "main.aspx.vb"..
Private Sub but_Login_Click(...
if not isclientscriptblockregistered( "openw" ) the
dim dq as 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 brower window, i.e., "frm_Activity.aspx"
Question2: If I wanted to dispose of the first broswer window - from the 2nd browser window - How would I do this?
 

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

Members online

Forum statistics

Threads
473,982
Messages
2,570,189
Members
46,734
Latest member
manin

Latest Threads

Top