ovezhao / css3-mediaqueries-js

Automatically exported from code.google.com/p/css3-mediaqueries-js
0 stars 0 forks source link

Not working on IE7 or IE8 #40

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Include the JS on the page
2. Navigate to page with JS on it
3. Error

What is the expected output? What do you see instead?
I expect it to not cause an error. Instead, I see the following: "Object 
doesn't support this property or method" which points to line 104: "var r=new 
XMLHttpRequest();"

What version of the product are you using? On what operating system?
IE8 - Windows XP

This seems to work on the IE 10 Dev tools when switiching to IE7 and IE8 
compatibility modes, but it causes an error on the real browsers.

Original issue reported on code.google.com by alexfrom...@gmail.com on 22 Nov 2013 at 9:31

GoogleCodeExporter commented 8 years ago
I narrowed it down to being caused by this:

<link href='http://fonts.googleapis.com/css?family=Montserrat' rel='stylesheet' 
type='text/css'>

Original comment by alexfrom...@gmail.com on 22 Nov 2013 at 9:52

GoogleCodeExporter commented 8 years ago
any solution?

Original comment by joshua.c...@gmail.com on 6 Dec 2013 at 12:02

GoogleCodeExporter commented 8 years ago
Yeah I put the Google Fonts in an IE Conditional comment, so that they won't 
load in IE browsers.

Original comment by alexfrom...@gmail.com on 6 Dec 2013 at 4:01

GoogleCodeExporter commented 8 years ago
Back from the dead... There is a new version of the script. It has some CSS 
parsing and processing improvements. If you're still using it, or would like to 
try again, could you confirm that this issue is solved or not?

Original comment by wou...@dynora.nl on 4 Apr 2014 at 11:46

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I have the same issue with the IE8 as the report, after update with latest 
version (1.0) of the script, I still have this same error message, any 
suggestions? Thank you!

Original comment by joy2ever...@gmail.com on 29 Sep 2014 at 2:22

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
After using the latest code, I still get the "Invalid procedure call or 
argument" error in the line 155, and then after some debugs, here are my 
updates base on the latest version of the script.

var requestText = function (url, fnSuccess, fnFailure) {
    var r = null;
    if (ua.ie) {
        if (typeof window.XMLHttpRequest === 'function') {
            r = XMLHttpRequest();
        } else {
            r = new ActiveXObject('Microsoft.XMLHTTP');
        }
    } else {
        r = new XMLHttpRequest();
    }

Seems the `XMLHttpRequest` is an recognized object for IE8 but is not a 
function, for my changes work for me, but any suggestions will be appreciated.

Here are some references:
http://msdn.microsoft.com/en-us/library/ie/ms535874%28v=vs.85%29.aspx
http://stackoverflow.com/questions/664315/internet-explorer-8-prototypes-and-xml
httprequest

Original comment by joy2ever...@gmail.com on 29 Sep 2014 at 7:22