update dossier chekcqual

This commit is contained in:
2025-05-16 18:46:16 +02:00
parent c53c298401
commit fa44531778
405 changed files with 89887 additions and 833 deletions
+55 -48
View File
@@ -1,52 +1,59 @@
//Getting value from "ajax.php".
function fill(article, material, color, description, part, arttype, cmcreport, cmcreportdate, reportof, kindtest) {
//Assigning values to corresponding input fields in "search.php" file.
$('#articlepartvalue').val(article);
$('#materialpartvalue').val(material);
$('#colorvalue').val(color);
$('#descriptionpartvalue').val(description);
$('#partid').val(part);
$('#arttypeid').val(arttype);
$('#cmcreportnumber').val(cmcreport);
$('#cmcdatereport').val(cmcreportdate);
$('#reportof').val(reportof);
$('#combo').val(kindtest).change();
function fill(
article,
material,
color,
description,
part,
arttype,
cmcreport,
cmcreportdate,
reportof,
kindtest
) {
//Assigning values to corresponding input fields in "search.php" file.
$('#articlepartvalue').val(article)
$('#materialpartvalue').val(material)
$('#colorvalue').val(color)
$('#descriptionpartvalue').val(description)
$('#partid').val(part)
$('#arttypeid').val(arttype)
$('#cmcreportnumber').val(cmcreport)
$('#cmcdatereport').val(cmcreportdate)
$('#reportof').val(reportof)
$('#combo').val(kindtest).change()
//Hiding "display" div in "search.php" file.
$('#display').hide();
//Hiding "display" div in "search.php" file.
$('#display').hide()
}
$(document).ready(function() {
//On pressing a key on "Search box" in "search.php" file. This function will be called.
$("#articlepartvalue").keyup(function() {
//Assigning search box value to javascript variable named as "name".
var name = $('#articlepartvalue').val();
//Validating, if "name" is empty.
if (name == "") {
//Assigning empty value to "display" div in "search.php" file.
$("#display").html("");
}
//If name is not empty.
else {
//AJAX is called.
$.ajax({
//AJAX type is "Post".
type: "POST",
//Data will be sent to "ajax.php".
url: "searchengine/ajaxsearch.php",
//Data, that will be sent to "ajax.php".
data: {
//Assigning value of "name" into "search" variable.
articlepartvalue: name
},
//If result found, this funtion will be called.
success: function(html) {
//Assigning result to "display" div in "search.php" file.
$("#display").html(html).show();
}
});
}
});
});
$(document).ready(function () {
//On pressing a key on "Search box" in "search.php" file. This function will be called.
$('#articlepartvalue').keyup(function () {
//Assigning search box value to javascript variable named as "name".
var name = $('#articlepartvalue').val()
//Validating, if "name" is empty.
if (name == '') {
//Assigning empty value to "display" div in "search.php" file.
$('#display').html('')
}
//If name is not empty.
else {
//AJAX is called.
$.ajax({
type: 'POST',
url: 'searchengine/ajaxsearch.php',
data: {
articlepartvalue: encodeURIComponent(name), // Codifica il valore
},
success: function (html) {
$('#display').html(html).show()
},
error: function (xhr, status, error) {
console.log('Errore AJAX: ' + status + ' - ' + error)
$('#display').html('Errore durante la ricerca. Riprova.')
},
})
}
})
})