Meteor doesn't work in IE9

749 views
Skip to first unread message

omniasoft

unread,
Mar 18, 2011, 10:40:11 AM3/18/11
to meteorserver
Meteor doesn't seem to work in IE9. Now that IE9 is out, and not just
a beta browser, it's imperative that Meteor be updated to support
IE9. Does anyone know of a workaround?

Thanks,

AG3

omniasoft

unread,
Mar 18, 2011, 12:25:33 PM3/18/11
to meteorserver
I've been trying to get this to work since I made my initial post. I
first tried to set the mode to 'xhrinteractive' in the hopes that it
would use that instead of 'iframe'. No success yet. What's really
annoying is that if I go into compatibility mode for IE9 Meteor _does_
work.

IE9 may be the best IE on the market, but something they've done in
this version is seriously messing with Meteor. Any help would be much
appreciated. I know _just enough_ about Meteor to get myself into
trouble working with the code. I think a Meteor whiz could figure an
IE9 solution out pretty quickly.

Any takers? Thanks in advance.

Sincerely,

AG3

Adam Elliott

unread,
Mar 18, 2011, 2:03:51 PM3/18/11
to meteor...@googlegroups.com
We recently ran into this problem as well on wethepixels.com.  Here is our solution:
In meteor.js (http://code.google.com/p/meteorserver/source/browse/trunk/public_html/meteor.js?r=39), remove lines 142 and 154.

//if (!Meteor.frameref) {
        var ifr = document.createElement("IFRAME");
        ifr.style.width = "10px";
        ifr.style.height = "10px";
        ifr.style.border = "none";
        ifr.style.position = "absolute";
        ifr.style.top = "-10px";
        ifr.style.marginTop = "-10px";
        ifr.style.zIndex = "-20";
        ifr.Meteor = Meteor;
        document.body.appendChild(ifr);
        Meteor.frameref = ifr;
//}
Meteor.frameref.setAttribute("src", url);

Getting rid of this IF statement causes meteor to always fall back to the "iframe" technique if there is an exception in the "ActiveXObject("htmlfile")" technique.  I don't understand what the code was trying to do in the case before, but that is what was causing the error.  This solution has been working out gread for us.

My last post didn't seem to work (hopefully this isn't a re-post)


HTH,
Adam

omniasoft

unread,
Mar 18, 2011, 4:33:53 PM3/18/11
to meteorserver
Worked perfectly! Thank you!

Through my debugging I had finally narrowed it down to IE9 failing to
create an ActiveX htmlfile object, but then it was also throwing an
exception when it reached the conditional statement you suggested that
I comment out.

In any event, thank you again.

Don't forget people, that if you're running meteord as a daemon you'll
have to kill the process and restart it to see the changes you've made
in meteor.js reflected in the live website.

AG3

On Mar 18, 2:03 pm, Adam Elliott <the.adam.elli...@gmail.com> wrote:
> We recently ran into this problem as well on wethepixels.com.  Here is our
> solution:
> In meteor.js (http://code.google.com/p/meteorserver/source/browse/trunk/public_html...),

Jose Mico

unread,
Mar 27, 2011, 8:00:38 PM3/27/11
to meteorserver
This is the fix that I applied in order to fix IE9 support:

+++ meteor.js
--- meteor.js
@@ -165,14 +165,7 @@
Meteor.frameref.parentWindow.Meteor = Meteor;
Meteor.frameref.close();
var ifrDiv = Meteor.frameref.createElement("div");
- Meteor.frameref.appendChild(ifrDiv);
+ try {
+ Meteor.frameref.appendChild(ifrDiv);
+ }
+ catch(e) {
+ //Meteor.frameref.appendChild() throws an exception
in IE9.
+ //This line doesn't
+ Meteor.frameref.documentElement.appendChild(ifrDiv);
+ }
ifrDiv.innerHTML = "<iframe src=\""+url+"\"></iframe>";
} catch (e) {
if (!Meteor.frameref) {

Andrew Betts

unread,
Apr 19, 2011, 6:01:49 AM4/19/11
to meteorserver
Thanks all. Jose's solution has been committed to trunk, version
1.06.07.

Andrew
Reply all
Reply to author
Forward
0 new messages