HI @z_mike70
You need to call the Onclick event slightly different. I am adding an example below. Inspect your button either you get the id of the button or use the CSS class name.

Try the following code. Using the id of the button as an example
$(document).ready(function() {
$('#NextButton').on("click", function() {
console.log(555, "Ragavan");
alert("Modal Test")
});
});
Output:

Hope it helps.
------------
If you like this post, give it a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users to find it.