David,

Are you sending the XML with the text/xml content type? Content types
are key to valid XML detection.

Micha Schopman
Project Manager

Modern Media, Databankweg 12 M, 3821 AL  Amersfoort
Tel 033-4535377, Fax 033-4535388
KvK Amersfoort 39081679, Rabo 39.48.05.380

------------------------------------------------------------------------
------------------------------------------------------------------------
-----
Modern Media, Making You Interact Smarter. Onze oplossingen verbeteren
de interactie met uw doelgroep. 
Wilt u meer omzet, lagere kosten of een beter service niveau? Voor meer
informatie zie www.modernmedia.nl 
------------------------------------------------------------------------
------------------------------------------------------------------------
-----
-----Original Message-----
From: David Brown [mailto:[EMAIL PROTECTED] 
Sent: zondag 5 juni 2005 6:08
To: CF-Talk
Subject: OT: xmlHTTP

I am very lost here. Any help would be great.  I am using xmlhttp on
another project without any errors.  But for the life me I can't figure
this out.  Alert(httpObj.responseText); will display the xml and the xml
will display in IE so I dont' think it's bad xml document.  But
alert(httpObj.responseXML); display nothing (not null), but nothing just
blank message box.  When I try to access a tag by name I get an
error,because there is nothing in the xml obj.

Here is the xml I am seing in httpObj.responseText:
<?xml version="1.0"
?><NumberOfJobApps><error>0</error><recordcount>2<recordcount></NumberOf
JobApps>

Here is the code I am using:
<script language="JavaScript" type="text/javascript">
  var httpObj = null;
  try {
    httpObj = new ActiveXObject("Microsoft.XMLHTTP");
  }catch(error) {
    try {
   httpObj = new ActiveXObject("Msxml2.XMLHTTP");
    }catch(error) {
      httpObj = null;
    }
  }
  if(!httpObj && typeof XMLHttpRequest != "undefined") {
    httpObj = new XMLHttpRequest();
  }
</script>

<script language="JavaScript" type="text/javascript">
  function GetJobData(ssn1,ssn2,ssn3){
    if(httpObj.readyState != 0) {
      httpObj.abort();
    }
 if (JobForm.SSN1.value != "" && JobForm.SSN2.value != "" &&
JobForm.SSN3.value != "") {
     if(httpObj) {
        httpObj.abort();
       httpObj.open("GET", "qryJobData.cfm?ssn=" +
ssn1+"-"+ssn2+"-"+ssn3, true);
       httpObj.onreadystatechange = function() {
    if (httpObj.readyState == 4){
     var xmlObj = httpObj.responseXML;
     alert(xmlObj.xml);
     var rcObj = xmlObj.getElementsByTagName("recordcount");

//      if (httpObj.responseText &&
httpObj.responseXML.getElementsByTagName('recordcount').item(0).firstChi
ld.data ==0){    
//    JobForm.PrevEmployee.focus();
//    return false; }
//           if(httpObj.responseText &&
httpObj.responseXML.getElementsByTagName('recordcount').item(0).firstChi
ld.data >1) {
//    alert("It has been less then 30 days since your last
application.\n Please wait until it has been more then 30 days");
//    return false;}
    }
      }
      httpObj.send(null);
   }
    }
  }
</script>

David



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208646
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to