Problem with browser communication in IE

I’m working on a small game where the game is initialized using browser java-script.

Basically the workflow is like this:

step 1 (Unity):
function Update()
    wait 10 frames
    if Unity has not recieved any call from Browser
       Application.ExternalCall("UnityInit",0); // let browser know Unity is started

step 2 (Browser):
function UnityInit()
    Wait 10 ms
    Call the method WebsiteRecievedJS on object Init (Unity)

step 3(Unity)
function WebsiteRecievedJS()
    // now Unity knows that Browser communication is ok
    Application.ExternalCall("UnityReady",0);

Step 4: (Browser)
function UnityReady()
    // setup Unity
    // Call InitDone

Step 5: (Unity)
function InitDone()
    // Load main menu

Step 2 and 3 is actually not really needed. Their purpose is to reach a state where both Unity and Browser knows for sure that the browser-communication is established.

This works fine in Firefox and Chrome, but on some Internet Explorer installations, the browser never receive the UnityInit(). If the IE runs with the Javascript debugging on, everything works.

Has anyone experienced problems like this. And is there any workaround for the problem?

Also I’m interested in knowing how many people have the problem. So if you see the bug, then report back in a comment to this post.

The full source code can be found here:
http://dl.dropbox.com/u/6024335/BrowserCommunicationTest.zip

And the problem can be seen here:
http://www.kickstartgames.com/browsertest/index.html

The error turned out to be a simple JavaScript error in the browser, that threw an exception

We just had the same problem here. In our case: IE raises an exception if you call “console.log” without having the console open.
So you open the console, no exception. You close the console, exception happens in silence, and the external call does not work.

It was extremely painful to find out the reason without the console turned on (meaning: using alert popups and moving them down each line of code to find where the exception was…)

hope it helps someone