diff BoosterPack/logintets/.svn/text-base/xml_http_request.js.svn-base @ 0:0d795f02a8bb tip

initial committ. what was I thinking?
author Robert McIntyre <rlm@mit.edu>
date Mon, 27 Sep 2010 16:57:26 -0400
parents
children
line wrap: on
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/BoosterPack/logintets/.svn/text-base/xml_http_request.js.svn-base	Mon Sep 27 16:57:26 2010 -0400
     1.3 @@ -0,0 +1,37 @@
     1.4 +// method that sets up a cross-browser XMLHttpRequest object
     1.5 +function getHTTPObject() {
     1.6 +	var http_object;
     1.7 +
     1.8 +	// MSIE Proprietary method
     1.9 +
    1.10 +	/*@cc_on
    1.11 +	@if (@_jscript_version >= 5)
    1.12 +		try {
    1.13 +			http_object = new ActiveXObject("Msxml2.XMLHTTP");
    1.14 +		}
    1.15 +		catch (e) {
    1.16 +			try {
    1.17 +				http_object = new ActiveXObject("Microsoft.XMLHTTP");
    1.18 +			}
    1.19 +			catch (E) {
    1.20 +				http_object = false;
    1.21 +			}
    1.22 +		}
    1.23 +	@else
    1.24 +		xmlhttp = http_object;
    1.25 +	@end @*/
    1.26 +
    1.27 +
    1.28 +	// Mozilla and others method
    1.29 +
    1.30 +	if (!http_object && typeof XMLHttpRequest != 'undefined') {
    1.31 +		try {
    1.32 +			http_object = new XMLHttpRequest();
    1.33 +		}
    1.34 +		catch (e) {
    1.35 +			http_object = false;
    1.36 +		}
    1.37 +	}
    1.38 +
    1.39 +	return http_object;
    1.40 +}
    1.41 \ No newline at end of file