zoltan-dulac / cssSandpaper

a CSS3 Polyfill that implements CSS3 transforms, box-shadow, gradients, opacity and RGBA/HSL/HSLA colours in browser that don't support them.
http://www.useragentman.com/blog/csssandpaper-a-css3-javascript-library/
208 stars 47 forks source link

Access is denied for IE8 #4

Open makapacs opened 12 years ago

makapacs commented 12 years ago

Hi,

First Issue i got was Exception 'Access is denied' when running line:

var xhr = XMLHelpers.getXMLHttpRequest(node.href, null, "GET", null, false); in cssSandPaper.js

Solution posted by Floyd Johnson at http://stackoverflow.com/questions/1482177/problem-with-ie8-using-ajax

From Floyd Johnson: In IE8 on Vista at least, the user needs to turn off the "native XMLHTTP support" (sounds counterintuitive). To do this:

Summon "Internet Options", then click the Advanced tab. Scroll down to the "Security" set of checkboxes (this could be a while), and uncheck "Enable native XMLHTTP support". You may need to also uncheck "Enable Integrated Windows Authentication" (also in the Security section) and restart IE8, per the discovery at http://community.xajax-project.org/topic/8540/access-is-denied-error-in-ie8/ You might have your web application detect if this needs to be done by looking for a JavaScript exception whose "message" property is "Access is denied" (or something of that ilk) when an attempt is made to POST to an HTTPS URL via your AJAX object.

(With Prototype, you would add an onException key-value pair to the same place as onSuccess and onFailure. It would look something like: onException:function(irrelevant_object,exc){alert(exc.message);}

The function body will be much more involved than displaying the essence of the thrown exception.)

If the relevant exception is thrown, put up a box telling the user how to turn off the XMLHTTP item in his/her copy of IE8.

zoltan-dulac commented 12 years ago

Do you have an example page where this exception is thrown? There may be a better solution for this than telling users to "fix the problem themselves". If you have an example page, I may be able to fix this issue programatically.

Thanks in advance, Zoltan.

aadchrom commented 12 years ago

Here is a test page with the same error.

http://altereco.fivesquares.org/templates/team.html