In the file blank.jsp, there is a button as follows:
<input class="submit_button" type="submit" id="btnPay" name="btnPay" value="Payment"
style="position: absolute; left: 350px; top: 130px;" onclick="javascript:payment();">
After clicking this button, I want to execute the Java method callprocedure() using AJAX.
function payment()
{
alert('Payment done successfully...');
........
// Use AJAX to call the Java method "callprocedure()"
........
}
I am inexperienced with AJAX. Can someone guide me on how to call a Java method using AJAX? Your help is much appreciated. Thank you in advance.