Hi there, i'm using autocomplete, for popolate an input with lastname if I create the json with only lastname all is ok. But really I would add matricula, name, lastname in my json. So my json will be {matricula:111, name:John, lastname:Doe}
I can create the json array, but I can't figure how use this json on autocomplete.
Hi there, I have some fields in same page, that I need check before save data in db. I created one function for each section, and for check I use a if chain
if(checkTestata()){
if(checkVigili()){
if(checkMezzi()){
if(checkAutista()){
interventoSave();
}
}
}
until function checkVigili everythings is ok. But function checkMezzi() don't work properly. This function check a table, and show a message to the user, if user click ok the return value is true, else is false. But the result of the function don't follow the user choise. the function is :
function checkMezzi() {
var row = 0;
var id;
var kmfine;
var kmin;
var kmfin;
var validazione;
$('#vehicle-table >tbody>tr').each(function () {
row++;
id = $(this).find('.id').html();
kmin = $(this).find('.kmini').html();
kmfin = $(this).find('.kmfine').val();
if (parseFloat(kmfin) < parseFloat(kmin)) {
bootbox.prompt("Errore Km mezzo", "Mezzo con Id: " + id + " km finali errati, corregere o rimuovere mezzo");
validazione = false;
}
else {
kmfine = parseFloat(kmfin) - parseFloat(kmin);
bootbox.confirm({
title: "Mezzo: " + id,
message: "Km Percorsi: " + kmfine + " I km sono corretti?",
buttons: {
confirm: {
label: 'Ok',
className: 'btn-success'
},
cancel: {
label: 'No',
className: 'btn-danger'
}
},
callback: function (result) {
if (result) {
validazione = true;
} else {
validazione = false;
}
}
});
}
});
if (row === 0) {
bootbox.alert("Nessun mezzo per intervento. Selezionare Mezzo")
Hi there, hope you got an amazing christmas gift. this is my problem: I have a year list, when I click on an element of list, I send the data by ajax to php, and refresh the page with new data. this is working perfetcly.
On my list I start with a simbol near the current year. If I click on different year I would that the simbol apper only in the year that I clicked. I can't achive this.
and I would add a class ('fa-check-circle') in 'i' when the user click on 'a' and delete all class ('fa-check-circle') in the other 'li' Actualy I can add class, but I don't know how delete the all class.
Hi. I have a form with some fields ad the field for upload an image. Inside this form there is a table with some rows. My target is send all form informations to php.
I can show the preview of the image, but to the php script ajax don't pass data, I try also with data: $('#userPhoto).serialize() without success. how I can perform my target?
when I click on Rooms + I need to add Adults row and Children row.
Is better if I add another table or add simply the row? Consider that when I click on Room - if there are the rows about Adults and Children this row must be deleted
Hi I have a table that show some images.
I add an Icon to delete the image when the icon is clicked.
the problem is select the correct namefile of image to use with ajax
I can insert record in db, but on my web page I can't catch the
resul if the record is inserted, if the record is non inserted i see
the alert message. Can someone help?