When typing in text fields in my web page I noticed random keystrokes are
occasionally skipped (ignored). You sometimes have to type a while before it happens.
I traced this down to a function we are using to check if the opener is still
open. Included is a simplified version of my problem. Any insight would be
appreciated.
I am testing with IE 7.0.5730.11 on Windows XP I don't see this behavior in IE 6.
<!-- Opener File -->
[HTML]<html>
<head>
<title>Exampl e</title>
<script>
function initForm()
{
window.open("ch eckopener.html" , "test");
}
</script>
</head>
<body onLoad="initFor m()">
</body>
</body>
</html>[/HTML]
<!-- File Checking opener with textbox -->
[HTML]<html>
<head>
<title>Exampl e</title>
<script>
function checkOpener()
{
if (opener == null || opener.closed)
{
self.close();
return;
}
setTimeout("che ckOpener()", 5); // value is set low to illustrate problem
}
function initForm()
{
checkOpener();
}
</script>
</head>
<body onLoad="initFor m()">
<center>
<input type="text" name="txtfield" ></input>
</center>
</body>
</body>
</html>[/HTML]
occasionally skipped (ignored). You sometimes have to type a while before it happens.
I traced this down to a function we are using to check if the opener is still
open. Included is a simplified version of my problem. Any insight would be
appreciated.
I am testing with IE 7.0.5730.11 on Windows XP I don't see this behavior in IE 6.
<!-- Opener File -->
[HTML]<html>
<head>
<title>Exampl e</title>
<script>
function initForm()
{
window.open("ch eckopener.html" , "test");
}
</script>
</head>
<body onLoad="initFor m()">
</body>
</body>
</html>[/HTML]
<!-- File Checking opener with textbox -->
[HTML]<html>
<head>
<title>Exampl e</title>
<script>
function checkOpener()
{
if (opener == null || opener.closed)
{
self.close();
return;
}
setTimeout("che ckOpener()", 5); // value is set low to illustrate problem
}
function initForm()
{
checkOpener();
}
</script>
</head>
<body onLoad="initFor m()">
<center>
<input type="text" name="txtfield" ></input>
</center>
</body>
</body>
</html>[/HTML]
Comment