Yes. another one.
This is not my first httprequest site, but it is only my second. I didn't have any
issues the first run through. the error produced is:
here is the code that is being excecuted. The startajax() runs from an onclick
This is not my first httprequest site, but it is only my second. I didn't have any
issues the first run through. the error produced is:
Code:
Error: uncaught exception: [Exception... "Component returned failure code: 0xc1f30001 (NS_ERROR_NOT_INITIALIZED) [nsIXMLHttpRequest.send]" nsresult: "0xc1f30001 (NS_ERROR_NOT_INITIALIZED)" location: "JS frame :: http://whathuhstudios.com/westside_dev/ :: sndReq :: line 32" data: no]
Code:
var browser = navigator.appName; function startajax() { sndReq(document.getElementById('catagorylist').value,'providerlist.php', 'test'); } function createRequestObject() { var ro; if(browser == "Microsoft Internet Explorer"){ ro = new ActiveXObject("Microsoft.XMLHTTP"); }else{ ro = new XMLHttpRequest(); } return ro; } var http = createRequestObject(); function sndReq(request, ajax_file, targeturi) { var requesturi = 'ajax/' + ajax_file ; document.getElementById(targeturi).innerHTML = requesturi; http.onreadystatechange = new Function(handleResponse(targeturi)); http.send(null); } function handleResponse(targeturi) { if(http.readyState == 4) { var response = http.responseText; document.getElementById(targeturi).innerHTML = response; } }
Comment