Source code for /src/ajax.htm.txt

//======================================================================//
// Author: Mark Qian <markqian@hotmail.com>                             //
// WWW: http://www.coolshare.com                                        //
// Copyright (c) 2006, Mark Qian                                        //
//                                                                      //
// You must contact Mark Qian to get a permission of use                //
// in case you want to make any use of the codes except viewing it     //
// on Mark's site.                                                      //
//======================================================================//


<script>
var rfNodeId='';
function callback() {
    if (xmlhttp.readyState==4) {
            document.write(xmlhttp.responseText);           
    }

}

function getFile(pURL) {
    if (window.XMLHttpRequest) { // code for Mozilla, Safari, etc 
        xmlhttp=new XMLHttpRequest();
        xmlhttp.onreadystatechange=callback;
        xmlhttp.open("GET", pURL, true); // leave true for Gecko
        xmlhttp.send(null);
    } else if (window.ActiveXObject) { //IE 
        xmlhttp=new ActiveXObject('Microsoft.XMLHTTP'); 
        if (xmlhttp) {
            xmlhttp.onreadystatechange=callback;
            xmlhttp.open('GET', pURL, false);
            xmlhttp.send();
        }
    } 
}
</script>
<body>
<input type=button value="Get Text" onclick="getFile('test.txt')">
</body>