I have 2 different projects that after they were converted to PHPMaker 2021.0.12 version the “click” functions stop working.This function appeared under edit tag → client side event.Here is the function:
Here is what I have… it is located under “Client Scripts>>Table-Specific>>Add/Copy Page>>Startup Script”
$(document).ready(function() {
// Form load event
$('input:checkbox[name="x_M_HazardRemoved[]"]').click(function() {
// Click event
if ($(this).is(':checked')) {
$('#x_M_TotalValue').val(0);
}
});
});
It does not show any errors during generation or when run on the site but it won’t do what I expect. Which is that when I click the radio button the value of M_TotalValue resets to zero.Thanks… I am running the latest version of PHPMaker.
Still I get no errors generating or running the website but the click does not reset the value to 0. I also added the console.log(this.value) but I don’t know where to look to get logs.Any help will be appretiated.
As arbei mentioned before, you should check the output of this code: console.log(this.value); from Console section of your browser (press F12), and then use this value in your if … code block to implement your business-logic.