Olá!
Estou com dificuldades em executar um comando JQuery, vejam bem a url que esta no código abaixo é executado retornando um XML sem nenhum problema no entanto ao executar por comando ajax o código vai pra exceção.
A url é um rest que retorna um XML
Alguém sabe dizer o motivo?
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>click demo</title>
<style>
p {
color: red;
margin: 5px;
cursor: pointer;
}
p:hover {
background: yellow;
}
</style>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<p>Consulta</p>
<script>
$( "p" ).click(function() {
$.ajax({
url: 'http://localhost:8080/CouponWeb/couponsUsed/11998884534/2/3/suppcomm/exdbrzl',
type: 'GET',
dataType: "xml",
success: function(xml) {
alert("p");
},
error: function (xml) {
alert("Ocorreu um erro inesperado durante o processamento.");
}
});
});
</script>
<div align="center">
<fieldset style="width:400px;height:230px;">
<div id="conteudotArea" align="left" />
</fieldset>
</div>
</body>
</html>