|
-
Dec 7th, 2001, 02:15 PM
#1
Thread Starter
Frenzied Member
Anyone have a good script for keeping a child window focused?
I need to open a new window and have the user finish with that window before going back to the parent. I tried the showModalDialog approach but it has too many problems. I used to have a script that would do wwhat I wanted but it dosen't seem to be working:
the parent's code:
Code:
var taiWin=0
function openchildwindow() {
var intWidth = document.body.offsetWidth / 2 - 225;
var intHeight = document.body.offsetHeight / 2 - 200;
taiWin= window.open("test.asp","TAI")
}
function keepchildontop(){
if(taiWin){
taiWin.Focus();
}
}
and in the parent's body tag
Code:
<BODY BGCOLOR="#<%= Session("BGColor") %>" TOPMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0" LEFTMARGIN="0" onFocus="keepchildontop()">
but that isnt working. Any suggestions?
Thanks in advance,
Michael
-
Dec 7th, 2001, 02:25 PM
#2
Frenzied Member
can't you do,
<body onBlur="document.focus();">
something like that, i never tried so give it a shot!
-
Dec 7th, 2001, 02:31 PM
#3
Thread Starter
Frenzied Member
So, simplistic, so obvious, so perfect. I don't know why I wanted to make it so hard for myself 
Thanks!
Michael
-
Dec 7th, 2001, 02:33 PM
#4
Frenzied Member
cool, i'm glad it worked!
one thing, does it let you go to a text box or click on a button!!
-
Dec 7th, 2001, 02:35 PM
#5
Thread Starter
Frenzied Member
you had me scared for a sec but it looks like it does
-
Dec 7th, 2001, 02:45 PM
#6
Frenzied Member
cool, sorry for the scaring part!!
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
|