Aggiunta associazione
This commit is contained in:
53
associazione/jsl/ordini_edit.js
Normal file
53
associazione/jsl/ordini_edit.js
Normal file
@@ -0,0 +1,53 @@
|
||||
$(function(){
|
||||
$("#categoria").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaprod.php",
|
||||
data: { 'categoria': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#produttore").html(r.prod);
|
||||
$("#materiale").html(r.mat);
|
||||
$("#vendita").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#produttore").on("change",function(e){
|
||||
var questo = $(this);
|
||||
var cat = document.getElementById("categoria");
|
||||
var zero = 0;
|
||||
|
||||
$.ajax({
|
||||
url: "cercaart.php",
|
||||
data: { 'produttore': questo.val(), 'categoria': cat.value},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#materiale").html(r.mat);
|
||||
$("#vendita").val(zero.value);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#materiale").on("change",function(e){
|
||||
var questo = $(this);
|
||||
|
||||
$.ajax({
|
||||
url: "cercamat.php",
|
||||
data: { 'articolo': questo.val()},
|
||||
dataType: "json",
|
||||
success: function(r) {
|
||||
if (r.status=="OK"){
|
||||
$("#vendita").val(r.art);
|
||||
$("#taglia").html(r.tag);
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user