<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> Faites un choix (text-colour:magenta)[''[[A]]''] - (text-colour:cyan)[''[[B]]''] - (text-colour:green)[''[[C]]''] (text-colour:magenta)[A : (str: $A)] (text-colour:cyan)[B : (str: $B)] (text-colour:green)[C : (str: $C)] [[FIN]] (str: visits) (set: $A to visits) [[LOOP]](str: visits) (set: $B to visits) [[LOOP]](str: visits) (set: $C to visits) [[LOOP]]<script> var sendData = JSON.stringify({ "A": (typeof harlowe.State.variables['A'] === "undefined" ? null : harlowe.State.variables['A']), "B": (typeof harlowe.State.variables['B'] === "undefined" ? null : harlowe.State.variables['B']), "C": (typeof harlowe.State.variables['C'] === "undefined" ? null : harlowe.State.variables['C']), "test": (typeof harlowe.State.variables['test'] === "undefined" ? "" : harlowe.State.variables['test']) }); console.log("Données envoyées:", sendData); $.ajax({ url: "https://alicecartaud.alwaysdata.net/save.php", method: "POST", contentType: "application/json", data: sendData }).done(function(response) { console.log("Data saved:", response); }).fail(function(xhr, status, error) { console.error("Erreur AJAX:", status, error); console.error("Réponse brute:", xhr.responseText); }); </script>