Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Fix: ActiveX Error on IE9 #763

Merged
merged 1 commit into from

2 participants

@happyalu

When trying to use JSONRPC, I was getting an error "Automation Server can't create an object." on IE9. Looking at library/dynamicajax.js, I added fallback options to library/pyjamas/HTTPRequest.ie6.py and that seems to have fixed the problem.

@xtfxme
Owner

@happyalu, this LGTM, thanks!

this does bring up the IE6 vs. IE9 issue again ... i will need to address this soon.

@xtfxme xtfxme merged commit 1f83a6b into pyjs:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 29, 2012
  1. @happyalu

    Fix for ActiveX error on IE9

    happyalu authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 1 deletion.
  1. +7 −1 library/pyjamas/HTTPRequest.ie6.py
View
8 library/pyjamas/HTTPRequest.ie6.py
@@ -1,5 +1,11 @@
class HTTPRequest(object):
def doCreateXmlHTTPRequest(self):
- return JS("""new ActiveXObject("Msxml2['XMLHTTP']")""")
+ try:
+ return JS("""new ActiveXObject("Msxml2['XMLHTTP']")""")
+ except:
+ try:
+ return JS("""new ActiveXObject("Microsoft.XMLHTTP")""")
+ except:
+ return JS("""new window.XMLHttpRequest()""")
Something went wrong with that request. Please try again.