clearly i must have overlooked something. here is my script, and below that is the data.
$("#kenteken").blur(function(){
var sRegistrationNr = $(this).val();
var sChassisNumber = false;
$.ajax({
type: "GET",
url: "/activeContent/warrantyClaim/ajax-xml-response.php",
data: "return=auto&kenteken="+sRegistrationNr,
dataType: "xml",
success: function(xml) {
$(xml).find("xmlresponse").each(function(){
$(this).find("data").each(function(){
var sChassisNumber = $(this).find("chassisnummer").text();
});
});
}
});
alert(sChassisNumber);
});
here is the data from the xml file (responding fine)
- <xmlresponse>
<result>GPZB89</result>
- <data>
<kenteken>GPZB89</kenteken>
- <chassisnummer>
- <![CDATA[ KNEFA2253N5000176
]]>
</chassisnummer>
</data>
</xmlresponse>
Where does this go wrong?