On Dec 22, 7:06*pm, Ed <e...@siliconforks.comwrote:
On Dec 22, 11:52*am,rbrowning1958<RBrowning1...@gmail.comwrot e:
I don't see how having the value of url or the line number will help
but seeing as you asked url is "xml/images.xml" and it's on line 28 in
myJavascriptlol. It is an html file containing thejavascript. It is
reading this XML file. I know it's failing on that line cos an alert
right after it never gets shown and IE reports the access deined error
if I tell it to report all errors in script. I am testing this
locally. When I get around to deploying it it will be on a Web server
which will have rights set up to allow access to the files on the
webserver. This for local testing.
I think you are seeing the problem described here:
*http://dev.jquery.com/ticket/963
Ed,
Spot on - thanks for that - it's allowed me to move forwards. I can
now read the file in both IE and FireFox - with IE using the Active X
(ActiveXObject("Microsoft.XMLHTTP")) and with FireFox using
XMLHttpRequest().
I've now run into some other compatibility between the two versions.
Both versions correctly read the XML file; I call my own routine from
the onreadystatechange event when state is 4:
req.onreadystatechange =
function() {
if (req.readyState == 4) {
preloadSlideshow(req);
}
So far so good and preloadSlideshow does indeed get called. Here's the
first part of it:
function preloadSlideshow(originalRequest) {
var slideshow = originalRequest.responseXML;
var slides = slideshow.getElementsByTagName('slide');
alert(slides.length.toString());
alert(originalRequest.responseText);
Both browsers display the responseText showing the entire XML file -
so they have both read it. The problem now is IE reports the number of
slide elements as 0, firefox correctly as 5. Is this another know bug?
Here's part of the XML file:
<slideshow>
<slide>
<image>images/slides/0013_arboretum_redbud.jpg</image>
<alttext>Photo: A very pretty picture</alttext>
<link>http://www.ucdavis.edu/about/</link>
<caption>A very pretty picture</caption>
<more>Scenes of UC Davis</more>
</slide>
<slide>
<image>images/slides/0016_aggie_band_trumpet.jpg</image>
<alttext>Photo: The Band-uh up close and personal</alttext>
<link>http://www.ucdavis.edu/sports_rec/</link>
<caption>The Band-uh up close and personal</caption>
<more>Scenes of UC Davis</more>
</slide>
...more here
</slideshow>
A bit frustrating all this!
Cheers
Ray