I have a web app that works fine from all browsers (IE9, Firefox, Chrome, Opera & Safari) on my development machine . When I deploy the web app to a test server, IE will start to choke on a particular javascript component (Zoomify).
I can have IE 9 open with the dev hosted web app in one tab and the test server web app in another tab and only the dev hosted app will work. The web app code is exactly the same on both machines, except for the web.config.
The Developer Tools show both sites as being in Browser Mode: IE9 Document Mode: IE9 standards.
The Zoomify component is failing on the following line:
c.onreadystatechange=null
with the error:
SCRIPT13: Type mismatch
What is going on here? Why is IE behaving differently with how it processes Javascript depending on where the web app is hosted?
Update
I’ve now tested on another server and strangely enough it is working. At this point, the situation is that when the web app is hosted on IIS 6, the javascript file will fail in IE.
A similar issue exists in Opera, but I do not get an error message.
Dev Machine
Windows 7
Web Server: Cassini
Status: Working
Test Server 1
Windows Server 2003
Web Server: IIS 6.0
Status: Not working
Test Server 2
Windows Server 2008
Web Server: IIS 7.0
Status: Working
The failing javascript line
c.onreadystatechange=nullwas misleading. Through debugging the Zoomify javascript code, I was able to determine that an error was being generated further up the call stack.The Zoomify component was attempting to download images for display and was failing due to IE not supporting cross domain calls over the
XMLHttpRequestobject. IE does support cross domain calls using theXDomainRequestobject. However, the Zoomify component does not provide support forXDomainRequest. Opera 11 does not support cross domain calls either.My workaround for the problem with IE & Opera was to not use cross domain calls and to make the image resources available via a URL on the same domain as the web app.