Art Clark

Navigation

Skip navigation.

Search

Site navigation

Email conversation

FromArt Clark
ToMe
SubjectXML importing script update and correction
Date2 October 2004 11:54
Mark,
Thanks for sharing your interpretation of the XMLHTTPRequest object(s). It
took me about 13 hours to come up with nearly the same example. I also
implemented a failover for 4th gen browsers... save html code<script.... >
in a cookie, then reload the page and write while the page loads.
 
While doing my research, I noticed that you wrote:
 
Internet Explorer 4+	 Works as expected in IE 5+ on Windows and Mac
(fails in IE 5.2 on Mac OS X 10.2 [only])	
 
I noticed that you didn't include the option for the earlier Microsoft
object:ActiveXObject('Msxml2.XMLHTTP'); I am sure that this would surely
help just a few more end users.
 
I have been testing various methods to load .js files into my project after
the document has been loaded. Many methods have worked, but this is by far
the most reliable cross-platform.
 
I would prefer to detect ie 5.2 on Mac myself using conditional compilation,
or appVersion...
 
 Conditional Compilation

 Conditional compilation is a technology new to Internet Explorer 4. It
 allows easy testing of a number of environmental properties, including the
 client operating system and the type of CPU. Table 23-3 lists the variables
 it supports. 

 Table 23-3 Variables Supported by Conditional Compilation


 Variable	 Description	
 @_win32 	true if using a Win32-based operating system (Windows 95 or
 later, Windows NT, or Windows 2000 or later)	
 @_win16 	true if using a Win16-based operating system (Windows 3.x)

 @_mac	 true if using an Apple Macintosh operating system	

[etc. etc. there are loads more] 

Anyway, thanks for the ear, and the insight to browser compatibilities.

Art Clark
FromMe
ToArt Clark
SubjectRe: XML importing script update and correction
Date2 October 2004 14:27
Art,

Some very interesting ideas. I like the way you have managed the failover
to 4th gen browsers. I have now added the extra Msxml2.XMLHTTP object check.

However, I disagree with your idea of using Conditional Compilation. For a
start, it is non-standard, where try...catch is. It also would require
several extra checks for the various platforms where try...catch only
requires one. It would also require updating as new architectures were used.
try...catch would always work.

try...catch also has the advantage that if another browser that I am not
aware of claims to support window.ActiveXObject but it actually does not
use it correctly, the try..catch will already take care of it for me. For
all I know, the OpenTV, Netbox and iPanel browsers may fall into this
category, and I do not even have to know.

Still, a useful thing that I was not aware of. I will keep note of it for
future reference, for when those browsers cause problems.


Thanks for the feedback.

Mark 'Tarquin' Wilton-Jones - author of http://www.howtocreate.co.uk/
This site was created by Mark "Tarquin" Wilton-Jones.
Don't click this link unless you want to be banned from our site.