You saved this item {response_key: "c23603c223032a4b4653fe49c80191f4dfa88e6a", ERROR: "Se debe ingresar el nombre del contacto", VAL: "0"}
y no funciona el boton tengo que usar por consola
<html>
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<head>
<script type="text/javascript">
var $entidad = $('#entidad');
var order_ent = {order_ent:$entidad.val()};
var $name = $('#name');
var order_name = {order_name:$name.val()};
var $cedula = $('#cedula');
var order_cedula = {order_cedula:$cedula.val()};
var $mail = $('#mail');
var order_mail = {order_mail:$mail.val()};
var $phone = $('#phone');
var order_phone = {phone:$phone.val()};
var $fax = $('#fax');
var order_fax = {order_fax:$fax.val()};
var $dir = $('#dir');
var order_dir = {order_dir:$dir.val()};
var $city = $('#city');
var order_city = {order_city:$city.val()};
var $cargo = $('#cargo');
var order_cargo = {order_cargo:$cargo.val()};
var $description = $('#description');
var order_description = {order_description:$description.val()};
console.log(order_description,order_dir,order_cargo,order_city,order_fax,order_cedula,order_mail,order_ent)
$('#idBoton').click( function(){
fetch('http://181.61.221.52:8119/operative/simplecreateticket/', {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"auth_key": "ffa07465e5af0a0f69d776e3a288dea1",
order_ent: $( "entity_number"), order_cedula: $("contact_identification"),
order_name: $( "contact_name"),
order_mail: $("contact_email"),
order_phone: $("contact_phone"),
order_fax: $("contact_fax"),
order_dir: $("contact_address"),
order_city: $("city_name") ,
order_cargo: $( "contact_position_name"),
order_description: $("description" ) })
})
.then(response => response.json()) // response.json() returns a promise
.then((response) => {
console.log("You saved this item", response); //returns the new item along with its ID
})
});
</script>
</head>
<body>
<p id="server"></p>
<div id="informacion">
<ul></ul>
<button id="clave"></button>
</div>
<div id="informacion_2">
<ul></ul>
<input type="number" id="entidad" value="valor">
<input type="text" id="nombre" value="valor">
<input type="number" id="cedula" value="valor">
<input type="mail" id="mail" value="valor">
<input type="number" id="phone" value="valor">
<input type="number" id="fax" value="valor">
<input type="text" id="dir" value="valor">
<input type="text" id="city" value="valor">
<input type="text" id="cargo" value="valor">
<input type="text" id="description" value="valor">
</div>
<button type="button" id="idBoton" class="btn btn-primary" >envio</button>
</body>
</html>
JSON.stringify({"auth_key": "ffa07465e5af0a0f69d776e3a288dea1", order})
?