// EZ XML By: Danny Tucker (c) 2006
var http = XMLObject();
function XMLObject()
{
var xmlObject;
var browser = navigator.appName;
// Create XML Object based on broswer type
if( browser == "Microsoft Internet Explorer" )
xmlObject = new ActiveXObject( "Microsoft.XMLHTTP" );
else
xmlObject = new XMLHttpRequest( );
return xmlObject;
}
// send( Element ID to write output into, path to working file )
function send( objectID, path )
{
// Open Worker Page
http.open( 'get', path );
http.onreadystatechange = function()
{
// If Worker Page Is Done Do Output
if( http.readyState == 4 )
{
responseText = http.responseText;
document.getElementById( objectID ).innerHTML = responseText;
}
}
http.send( null );
}
|