Dougie Brown
2006-01-09 14:31:03 UTC
Hi
Not sure if this is the right group to post this, apoligies if it isn't!
On some PCs running Windows XP SP1 and IE6 the following javascript code
opens two windows. On other PCs it works as expected and only opens a single
window into which the results are posted. Both PCs are running the same
version of IE although the patches applied as reported on help about are
different.
Note this is a simple example to show this behaviour, the actual app is more
complicated!
It works fine with Firefox 1.5 on a machine with IE6 that opens the two
windows.
It looks like IE cannot find the form based on it's name and hence opens up
a new window even though the one to post to already exists.
Any ideas?
Cheers
Doug
<html>
<head>
<title>Search</title>
</head>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function postTo(formTarget,popUp){
document.all.search.target = formTarget;
if (popUp == true){
return popIt(formTarget);
}
document.all.search.submit();
}
function popIt(formTarget) {
var n = window.open('about:blank', formTarget,
'scrollbars=yes,height=350,width=650,status=no');
return true;
}
//-->
</SCRIPT>
<body>
<form name="search" action="test1.htm" method="post">
<INPUT type="submit" value="post form to popup"
onClick="postTo('form_win',true);">
</form>
</body>
</html>
Not sure if this is the right group to post this, apoligies if it isn't!
On some PCs running Windows XP SP1 and IE6 the following javascript code
opens two windows. On other PCs it works as expected and only opens a single
window into which the results are posted. Both PCs are running the same
version of IE although the patches applied as reported on help about are
different.
Note this is a simple example to show this behaviour, the actual app is more
complicated!
It works fine with Firefox 1.5 on a machine with IE6 that opens the two
windows.
It looks like IE cannot find the form based on it's name and hence opens up
a new window even though the one to post to already exists.
Any ideas?
Cheers
Doug
<html>
<head>
<title>Search</title>
</head>
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
function postTo(formTarget,popUp){
document.all.search.target = formTarget;
if (popUp == true){
return popIt(formTarget);
}
document.all.search.submit();
}
function popIt(formTarget) {
var n = window.open('about:blank', formTarget,
'scrollbars=yes,height=350,width=650,status=no');
return true;
}
//-->
</SCRIPT>
<body>
<form name="search" action="test1.htm" method="post">
<INPUT type="submit" value="post form to popup"
onClick="postTo('form_win',true);">
</form>
</body>
</html>