I made a script with JQuery to use AJAX and it's working. The problem is when interpreting the XML is returned, the XML is the result of a login attempt, it contains information indicating whether the user was authenticated or not, otherwise it contains an error description:
<result id='0 ou 1'>erro caso exista ou fica vazio</result>
But at the time of reading this:
success: function(data){
var s = $(data).find("result").each(function(){
var id = $(this).attr('id');
if(id == 0){
var error = $(this).text();
$(".error_description").text(error);
$(".error_description").css(display:"block");
}
else{
$(window.document.location).attr('href', "/Snotes/user_panel.php?id=" + id);
}
});
}