Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

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

irt.org | Knowledge Base | JavaScript | Window | Q1228 [ previous next ]

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

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?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.