I have a problem with AJAX, I have a field in HTML:
<input type="hidden" id="numreporte" name="numeroreporte" value="30" >
And I have the following function:
function valnumreport(){
$.ajax({
type: 'POST',
url: 'ruta.php',
data:'numeroreporte='+ document.getElementById('numreporte').value,
success:function(response){
alert (numeroreporte);
}
});
}
And I call the function with a onchange
:
onchange ='valnumreport()'
What I want is to send the value of hidden
to another page with an event onchange
but it does not send it, I'm just working with AJAX so I do not have much knowledge.