Salve a tutti!
Premetto che non sono una cima - con il jquery, intendo! - ma piano piano sto cercando di imparare.
Premesso ciò, ho un discorso del genere:
che funziona alla grande! Ma appena modifico così:codice:$(document).ready(function() { $(".cat").click(function(){ id = $(this).attr('id'); comp_id = "id=" + id; $.ajax({ type: "GET", url: "../content/listinopap_exe.php", data: comp_id, success: function(response){ $("#tipo_pap").html(response); } }); }); });
La seconda funzione non vuole saperne di andare.codice:$(document).ready(function() { $(".cat").click(function(){ id = $(this).attr('id'); comp_id = "id=" + id; $.ajax({ type: "GET", url: "../content/listinopap_exe.php", data: comp_id, success: function(response){ $("#tipo_pap").html(response); } }); }); $(".tipopap").click(function(){ id = $(this).attr('id'); comp_id = "id=" + id; $.ajax({ type: "GET", url: "../content/prodotti_exe.php", data: comp_id, success: function(response){ $("#prodotti").html(response); } }); }); });
Dove sbaglio?

Rispondi quotando
