R
rbrowning1958
Hello,
I found some JavaScript to do im,age slideshows without having to list
all the images in an array:
http://webmasters.ucdavis.edu/resources/js_slideshow.html
You populate an XML file with the names / descriptions of the images
and this code loads them and displays them autmotically. The code
looks very well written but it's complex and it's using Ajax to read
the XML_ file (I suppose). However, it works fine in FireFox 8 but not
in IE 7. Now I'm guessing at what some of this code does but I think
it boils down to this:
var url = source_xml;
var myAjax = new Ajax.Request(url, { method: 'get', onComplete:
preloadSlideshow });
source_xml is a param to the routine so must be the code that is
retrieving the XML file and I'm guessing onComplete function is being
called when it's finished. I think it's this bit of the code that's
not working.
Ajax is this:
var Ajax = {
getTransport: function() {
return Try.these(
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
function() {return new XMLHttpRequest()}
) || false;
},
Now I just read a bit about how ajax talks to things and I know it's
diffrent for diff. browsers so 'm guessing it's trying these in this
order. Can anyone have a guess at why this isn't working in IE 7?
Thanks
Ray
I found some JavaScript to do im,age slideshows without having to list
all the images in an array:
http://webmasters.ucdavis.edu/resources/js_slideshow.html
You populate an XML file with the names / descriptions of the images
and this code loads them and displays them autmotically. The code
looks very well written but it's complex and it's using Ajax to read
the XML_ file (I suppose). However, it works fine in FireFox 8 but not
in IE 7. Now I'm guessing at what some of this code does but I think
it boils down to this:
var url = source_xml;
var myAjax = new Ajax.Request(url, { method: 'get', onComplete:
preloadSlideshow });
source_xml is a param to the routine so must be the code that is
retrieving the XML file and I'm guessing onComplete function is being
called when it's finished. I think it's this bit of the code that's
not working.
Ajax is this:
var Ajax = {
getTransport: function() {
return Try.these(
function() {return new ActiveXObject('Msxml2.XMLHTTP')},
function() {return new ActiveXObject('Microsoft.XMLHTTP')},
function() {return new XMLHttpRequest()}
) || false;
},
Now I just read a bit about how ajax talks to things and I know it's
diffrent for diff. browsers so 'm guessing it's trying these in this
order. Can anyone have a guess at why this isn't working in IE 7?
Thanks
Ray