Oliver Blindenbacher

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromOliver Blindenbacher
ToMe
Subjectimportxml.js with IE7
Date30 November 2006 18:04
Hi Mark

First thank you for your countless scripts contributed to the public. I
use your importxml.js to read a configuration XML before starting a
Macromedia Flash component. Unfortunately we don't have any control over
users browser. Some of them now use IE7 and importxml.js no longer works
for them. 

Debugging with alerts it looks as the scripts takes in IE7 the same path
as Gecko and Opera-Browsers: if(window.XMLHttpRequest) seems to be true,
but IE7 fails on the following XMLHttpRequest-function open("GET", oURL,
true). If I comment out the if(window.XMLHttpRequest)-section everything
works fine in IE7. Can the condition get changed that IE7 will take the
right section?

Thanks for your help, kind regards Oliver
FromMe
ToOliver Blindenbacher
SubjectRe: importxml.js with IE7
Date1 December 2006 10:15
Oliver,

> Can the condition get changed that IE7 will take the right section?

IE 7 should work with the same code as the other browsers (it works on my
online demo), but for some reason, not when it is on your local computer.
They broke something in their XMLHttpRequest constructor. I am not really
sure what or why, but it throws some stupid exception when used locally.
Does it work for you if you put it online?


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromOliver Blindenbacher
ToMe
SubjectRe: importxml.js with IE7
Date1 December 2006 10:36
Mark, thank you for your really quick answer. Yes, it works online, but
unfortunately we have some deliveries out on CD-ROM. If I extend the
Gecko&Co Condition with the window.ActiveX-request as follows
if( window.XMLHttpRequest && !window.ActiveXObject )
both Firefox 2 and IE7 work fine locally. Are there any side effects by this
workaround?

Oliver
FromMe
ToOliver Blindenbacher
SubjectRe: importxml.js with IE7
Date1 December 2006 11:36
Oliver,

> if( window.XMLHttpRequest && !window.ActiveXObject ) both Firefox 2 and
> IE7 work fine locally. Are there any side effects by this workaround?

Yes. It works for now (and that may be ok if your project is intended only
for the short term), but it will not work if/when other browsers start
implementing ActiveXObject. There are currently the following browsers that
have the constructor (of which IE Windows, and Opera 7.6 can use it for
XMLHttpRequest):
IE Windows
IE Mac
iCab
ICEbrowser
Opera 7.6 (7.6 betas only - not in 8+)

Some others may add it in future. Mozilla already has a project to get
ActiveX running in Mozilla. Currently it uses window.GeckoActiveXObject
instead of window.ActiveXObject but that may change in future. If that is a
problem, then I am afraid I have no solution.

Tarquin
FromOliver Blindenbacher
ToMe
SubjectRe: importxml.js with IE7
Date1 December 2006 11:39
Thanks a lot for your detailed answer. Have a good weekend, Oliver
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.