AJAX waypoint/quest enable/disable working

This commit is contained in:
Hash Borgir
2023-06-02 04:42:29 -06:00
parent b9f4054028
commit ce83c42701
4 changed files with 111 additions and 113 deletions

View File

@@ -352,7 +352,29 @@ $(document).ready(function () {
});
});
$(".qcheck").change(function () {
// Toggle the value between 0 and 1
var value = $(this).is(":checked") ? 1 : 0;
// Get the name of the checkbox
var name = $(this).attr("name");
// Get the name of the difficulty
var diff = $(this).attr("diff");
// Get the value of the input named "filePath"
var filePath = $("input[name='filePath']").val();
// Construct the URL for the GET request
var url = "/saveCharacter.php?cmd=q&name=" + name + "&value=" + value + "&filePath=" + filePath + "&diff=" + diff;
// Send the GET request
$.get(url, function (response) {
// Handle the response if needed
console.log(response);
});
});
});// end document.ready