Date: 11/11/05 (WebDesign) Keywords: html, xml, java, microsoft I'm building a page and plan on using some Asynchronous JavaScript (AJAX without the XML basically). Anywho, the problem is, it just doesn't seem to work at all. function ajaxLauncher() { var args = ajaxLauncher.arguments; var httpRequest = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHTTPRequest(); switch (args[0]) { case "begin_exe" { alert("Working!"); setContent(); ajaxLauncher("show_content", "mainContent[0]", "content"); break; } case "show_content" { if (httpRequest) { httpRequest.onreadystatechange = function() { if (httpRequest.readyState == 4 && httpRequest.Status == 200) { container = document.getElementByID(args[2]); container.innerHTML = httpRequest.responseText; } } httpRequest.open("GET", args[1], true); httpRequest.send(null); } break; } } } function setContent() { mainContent = new Array(); mainContent[0] = "index2.html"; } I'm calling it on my page's onload event. Any help would be very much appreciated. x-posted to Tek-Tips. Source: http://www.livejournal.com/community/webdesign/1014912.html
|