I'm doing a POST request in AJAX, and when I get the response, if I try to alert it for example, I get this:
[object XMLDocument]
here is my code:
$(document).ready(function(){
$("button").click(function(){
var inputreg = document.getElementById("reginput").value;
$.post("linkhere...",
{
RegistrationNumber: inputreg,
username: "myusername",
dataType: "xml"
},
function(data){
alert(data);
});
}); });
I'm trying to get a certain value from the xml, for example 'Description'..
edit: here is part of the response:
<vehicleData>
<ABICode>12345</ABICode>
<Description>lorem ipsum</Description></vehicleData>