Note: window.focus() issue with Internet Explorer (IE6, IE7)

Share your tips, tricks and favorite iMacros macros, scripts and applications for web automation in general here.
Post Reply
User avatar
Tech Support
Posts: 4947
Joined: Tue Sep 20, 2005 7:25 pm

Note: window.focus() issue with Internet Explorer (IE6, IE7)

Post by Tech Support » Wed Feb 07, 2007 5:05 pm

We discovered a problem with the window.focus(); command inside of Internet Explorer. When this element is on a web page, it is impossible to move IE in the background or to enter a new URL. With IE7, the problem only occurs if you click "yes" on the "Allow blocked content" bar that appears.

Technically this is not a problem with iMacros itself, but Internet Explorer. But it affects the web page recording with iMacros:

If you want to record a macro on such a page, we recommend that you save the page to a local file first and remove the window.focus() command. Then record your commands on the local page.

REPLAY is not affected by the problem. So once you recorded the macro on the modified page, it works well with the real page, too.

Code: Select all

   <link rel="stylesheet" href="/precos/css/styles.css" type="text/css">
   <script language="JavaScript">
   <title>Windows.Focus Test Page - iOpus</title>

<body bgcolor="#ffffff" onBlur="javascript:window.focus();">
  Test Page
Post Reply