PHP Classes

File: awfDialog/examples/GradientBuilder/ajax.js

Recommend this page to a friend!
  Classes of AW Ford   awfDialog Wizard   awfDialog/examples/GradientBuilder/ajax.js   Download  
File: awfDialog/examples/GradientBuilder/ajax.js
Role: Auxiliary data
Content type: text/plain
Description: client-side ajax javascript for this example
Class: awfDialog Wizard
Generate wizard-like Web user interface using AJAX
Author: By
Last change: cross-browser compatibility fix
Date: 16 years ago
Size: 1,559 bytes
 

Contents

Class file image Download
// 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; } }