I'm trying to pass the values of several input to a function in ajax, but it does not pick them up.
<input type="hidden" name="rooms" value="<?php echo $room ?>">
<input type="hidden" name="destination" value="<?php echo $id_destination ?>">
<input type="hidden" name="hotel" value="<?php echo $id_hotel ?>">
<input type="hidden" name="codigo" value="<?php echo $id_codigo ?>">
function enviarDatosEmpleado(){
//recogemos los valores de los inputs
email=document.cliente.email.value;
idrooms=document.cliente.rooms.val;
iddestination=document.cliente.destination.val;
idhotel=document.cliente.hotel.val;
idcodigo=document.cliente.codigo.val;
}
And if I change the hidden
in the input per text, it does.