View Full Version : popup focus
landon11
03-05-2003, 02:35 PM
is there a way to open a popup and put focus on it. I have onLoad="window.focus();" but I have a lot of server side script going on so that doesn't happen imediately. Is there a parm that I can put in window.open()?
Skyzyx
03-05-2003, 03:44 PM
Normally, the popup window has focus by default... however, you could do this:
newWin=window.open(parameters);
newWin.focus();
cheesebagpipe
03-05-2003, 10:25 PM
Always put the call to window.focus() inside the pop-up document, if possible...this will avoid any 'access denied' errors in Internet Explorer if the new window isn't ready to be scripted yet. Just remove the call to .focus() from the onload handler so it runs immediately:
<head>
<script type="text/javascript">
self.focus();
</script>
.........
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.