I am working on a comment system on a social network, I use jquery, I can leave comments with ajax without problems, but sometimes I need a user to submit a captcha form if they post too many comments or for other reasons.
I think the best way to do this is to add it to the current part of posting comments, if the php script returns a response stating that we need to make the captcha form, then I would like to automatically open the dialog box on the screen, let the user fill in the captcha form, and then continue and post a comment.
This is somewhat difficult for me, but I have most of it, I think maybe you can read my comments below and help me with the captcha part, mainly about how I can open a dialog to open, how I can go through comment value / text through captcha and back to the comment, again reinforcing success, and also, if the user reads the code incorrectly, then he will reload the captcha
$.ajax({ type: "POST", url: "processing/ajax/commentprocess.php?user=", data: args, cache: false, success: function (resp) { if (resp == 'captcha') {
source share