// cross-broser fixes provided by Wes Friend
http = getHTTPObject();
function getHTTPObject()
{
var xmlhttp;
if (window.ActiveXObject)
{
var aVersions = [ "MSXML2.XMLHttp.5.0",
"MSXML2.XMLHttp.4.0","MSXML2.XMLHttp.3.0",
"MSXML2.XMLHttp","Microsoft.XMLHttp"
];
for (var i = 0; i < aVersions.length; i++)
{
try
{
xmlhttp = new ActiveXObject(aVersions[i]);
}
catch (oError)
{
//Do nothing
}
}
}
else if (window.createRequest)
{
xmlhttp = window.createRequest();
}
else
{
xmlhttp = new XMLHttpRequest();
}
return xmlhttp;
}
function doStart(){
var url = "steps.php?step=1";
http.open("GET", url, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
function doStep(step){
var url = "steps.php?step=" + step + "&Hex1=";
url += document.getElementById('Hex1').value;
url += "&Hex2=";
url += document.getElementById('Hex2').value;
url += "&Width=";
url += document.getElementById('Width').value;
url += "&Height=";
url += document.getElementById('Height').value;
http.open("GET", url, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
function handleHttpResponse(){
if(http.readyState == 4){
document.getElementById('container').innerHTML = http.responseText;
//document.getElementById('raw').value = http.responseText;
}
}
|