// AJAX3D3c.js 20070201 var xmlhttp = null; // Helper function to perform request; // synchronous to keep it simple for now function sendXMLHttpRequest(url) { if (xmlhttp == null) { xmlhttp = createXMLHttpRequest(); } xmlhttp.open("GET", url, false); xmlhttp.send(""); return xmlhttp.responseText; } // Helper function to create XMLHttpRequest request function createXMLHttpRequest() { if ( window.XMLHttpRequest ) // All current { try { return new window.XMLHttpRequest(); } catch(e) {alert("window.XMLHttpRequest failed"+e.message);} } else // old IE { try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {alert("Platform not supported"+e.message);} } } // IE7 XMLHttpRequest does not operate locally. // If you need local operation, either // use Firefox // for local testing (it runs locally using the same code) // or re-rig the script to use the old IE object. // A way to do this is the following: // try { return new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) {} // try { return new ActiveXObject("Microsoft.XMLHTTP"); } catch (e) {} // try { return new XMLHttpRequest(); } catch(e) {} // alert("XMLHttpRequest not supported");