[jQuery] Jquery makes two ajax requests in one!!
I have a strange problem. I have to do an ajax request after a select
box changes (change event) so i have the following code:
$('#comprensori_id').change(function() {
var comprensorio_id = $(this).val();
$.ajax({
type: "GET",
url: "",
data: "comprensorio_id=" + comprensorio_id,
success: function(data, msg){
$('#comuni_id').empty();
$('#comuni_id').append(data);
}
});
});
the problem is that when i change the select box selection my browser
makes two consecutives same ajax request and i can't figure out
why...this is very strange