PDA

View Full Version : IE Freeze on httprequest, FF works fine! Only WinServer



ToxSox
Sep 14th, 2007, 09:44 AM
Hello.

This is my first post here and i have a big problem with my script!

One page (child.htm), was delivered not by me and i can't change it. This page calls a methode in a object of my page. I have opened the child.htm in a popup, so by opener.API the child.htm page can user the methodes which was defined in my API Obnject on (parent.htm). On my parent.htm, with i can edit, the called methode "sendValue" open a sync HTTPRequest and will deliver the result back to the child.htm. The backdelivering isnt implementet jet, but the call must be syncron, because otherwise i cant get a return call of the sendValue methode.


I have found this things:

The freeze of the IE is in every IE version.
The freeze is only, if the Webserver is a Windows machine, on a Linux Webserver it works.
And the freeze is only, if in the child.htm was requiered 2 *.htc files which havn't exist. If one of this htc files exist, the freeze doesn't do.
The freeze script freeze on the xmlHttp.send(null); methode.
If on the child.htm page a alert() was called before the API.sendValue methode was called the ie doenst freeze, but if i set a alert() in the parent.htm to sendValue mehtode, the freeze is still there.

I have uploaded the script on one windows and one linux server.

Links:

Side to test:
http://www.tsojka.de/ie/parent.htm (Linux)
http://dev24-2.reflact.com/ie/parent.htm (Windows)

and the child page, which was opened by parent.htm

http://www.tsojka.de/ie/child.htm
http://dev24-2.reflact.com/ie/child.htm

And at least the code:
parent.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>
<title>test parent</title>
<script type="text/javascript">
var popup;
var API = new Object();

API.sendValue = function (paramName, value) {

var xmlHttp = null;
if (typeof XMLHttpRequest != 'undefined') {
xmlHttp = new XMLHttpRequest();
}
if (!xmlHttp) {
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch(e) {
xmlHttp = null;
}
}
}

var page = document.URL.match(".*:\/\/[^/]*\/[^/]*\/") + "test";
if (xmlHttp) {
xmlHttp.open('POST', page, false);
try {
xmlHttp.send(null);
} catch(e) {
}
}
return "BLA";
}

function openWindow(href) {
popup = window.open(href, "BUGWINDOW", "width=50,height=50,left=0,top=0,location=no,scrollbars=auto,resizable=yes, menubar=no, status=no, toolbar=no");
}
</script>

</head>

<body>
<a href="javascript:openWindow('child.htm')">START BUG</a>
</body>
</html>


child.htm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<style>
.aClass {
behavior:url(a.htc) url(b.htc);
}
</style>
</head>
<body>
<span class="aClass">IE BUG</span>
<script type="text/javascript">
bla = window.opener.API.sendValue("A", "B");
</script>
</body>
</html>

Can anyone help me?

ToxSox
Sep 14th, 2007, 05:27 PM
My last result is, that the problem is with the maxConnectionsToServer from the IE. If i change the setting in my registry, it works. But the default value are 2 connections!
I think that the child has reserved 2 connections and the parent doesnt know about this, so the parent wants to create the 3.