Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

Q1228 How can I add the required delay to overcome the 'access denied' error when focusing popup windows in Internet Explorer?

You are here: irt.org | FAQ | JavaScript | Window | Q1228 [ previous next ]

If the page you open comes from another server forget it. Otherwise try:

<script language="JavaScript"><!--
var popUp_Window = ""; // make it global

function popUpWindow(pagename) {
   popUp_Window = window.open(pagename,"pop_up","width=349,height=410");

   if (window.focus) setTimeout('popUp_Window.focus()',1000);
}
//--></script>

However a much safer (and instant) method is to put this in the page you open:

<body onLoad="if (window.focus) self.focus()">

Feedback on 'Q1228 How can I add the required delay to overcome the 'access denied' error when focusing popup windows in Internet Explorer?'

©2018 Martin Webb