I typed in the wrong xml doc... the blow line is wrong: <?xml version="1.0" ?<NumberOfJobApps><error>0</error><recordcount>2<recordcount></NumberOfJobApps>
The is what I see in httpObj.responseText: <?xml version="1.0" ?<NumberOfJobApps><error>0</error><recordcount>2</recordcount></NumberOfJobApps> ----- Original Message ----- From: "David Brown" <[EMAIL PROTECTED]> To: "CF-Talk" <[email protected]> Sent: Sunday, June 05, 2005 1:07 AM 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></NumberOfJobApps> > > 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).firstChild.data > > ==0){ > // JobForm.PrevEmployee.focus(); > // return false; } > // if(httpObj.responseText && > httpObj.responseXML.getElementsByTagName('recordcount').item(0).firstChild.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 > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Discover CFTicket - The leading ColdFusion Help Desk and Trouble Ticket application http://www.houseoffusion.com/banners/view.cfm?bannerid=48 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:208618 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

