|
-
Jun 9th, 2004, 01:32 AM
#1
Thread Starter
Frenzied Member
window.focus()
When I call this function the window appears as desired but the window is not focused. Isn't that possible? Still the mother window is focused.
Code:
Sub JavaScriptAlertRedirect()
Dim strScript As String = ""
strScript = "<script>"
strScript = strScript & "var winName = 'w';"
strScript = strScript & "var winFeatures = 'width=520,height=640,top=0,left=0,status';"
strScript = strScript & "var winURL = 'http://localhost/Prisberegning2004/udskrift.aspx';"
strScript = strScript & "var w;"
strScript = strScript & "w = window.open(winURL,winName,winFeatures);"
strScript = strScript & "w.focus();"
strScript = strScript & "</script>"
'Allows the alert box to be shown without wiping the controls off the page.
Page.RegisterStartupScript("ClientScript", strScript)
End Sub
-
Jun 10th, 2004, 07:24 AM
#2
Frenzied Member
That works for me. What browser are you using?
-
Jun 10th, 2004, 09:03 AM
#3
Thread Starter
Frenzied Member
It's Win200 Pro with IE 6.0.2800.1106CO and the window from which I redirect remains active and the new window is placed in the background
-
Jun 10th, 2004, 10:38 AM
#4
Frenzied Member
When are you calling JavaScriptAlertRedirect() ?
The main page may be doing more processing and somehow keep focus.
I just did a test of your function on a button click and it works fine. I have the exact same OS and IE version.
You may try setting status=no in the winFeatures var
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|