Email conversation
From | Stian Totland |
To | Me |
Subject | Bug in IE5.2 for Mac (XML importing script)? |
Date | 6 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
From | Me |
To | Stian Totland |
Subject | Re: Bug in IE5.2 for Mac (XML importing script)? |
Date | 6 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/
From | Stian Totland |
To | Me |
Subject | Re: Bug in IE5.2 for Mac (XML importing script)? |
Date | 6 October 2005 11:23 |
Mark,
of course! I should have known this. Sorry for bothering you with
stupid questions ;-)
Stian