mirror of
https://gitlab.com/hashborgir/d2tools.git
synced 2025-10-13 08:24:24 -05:00
AJAX waypoint/quest enable/disable working
This commit is contained in:
22
res/app.js
22
res/app.js
@@ -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
|
Reference in New Issue
Block a user