Stian Totland

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromStian Totland
ToMe
SubjectBug in IE5.2 for Mac (XML importing script)?
Date6 October 2005 00:32
Hi,

and first of all thank you very much for a great script. I know it's  no big
deal, since "nobody" uses it, but I can't get it to work on  IE5.2 for Mac
on Tiger. I get an "document.body is not an object"  error. Could you please
take a look at [URL]  for me? I would be very greatfull!!!

Best, Stian Totland
FromMe
ToStian Totland
SubjectRe: Bug in IE5.2 for Mac (XML importing script)?
Date6 October 2005 00:51
Stian,

> I know it's  no big deal, since "nobody" uses it

I dunno, it is still the most popular on Mac OS 9, and Mac OS 9 is still used
by about 50% of mac users. And it is also part of MSN for Mac OS X.

> I get an "document.body is not an object"  error.

Your problem is probably because the script is in the head, and runs
immediately, before you have created the body. You would get the same error
in Opera 7-7.5 (not in later versions though), as it also uses the iframe.

You need to make sure you put this call after the body tag has been written:
var canItWork = importXML( 'data.xml', 'processXML', false, 2000);

Most XMLHttpRequest sort of scripts are run only after the page has
completed loading (when the onload event fires), as that avoids this sort of
problem.


Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
FromStian Totland
ToMe
SubjectRe: Bug in IE5.2 for Mac (XML importing script)?
Date6 October 2005 11:23
Mark,

of course! I should have known this. Sorry for bothering you with
stupid questions ;-)

Stian
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.