This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* JS/JQUERY Written by the Coding Magician 2010 */ | |
//$(document).ready(function() { | |
//alert("js is working"); | |
//CAPTCHA | |
//}); | |
//Validate the Recaptcha' Before continuing with POST ACTION | |
function validateCaptcha() | |
{ | |
challengeField = $("input#recaptcha_challenge_field").val(); | |
responseField = $("input#recaptcha_response_field").val(); | |
var html = $.ajax({ | |
type: "POST", | |
url: "validateform.php", | |
data: "form=signup&recaptcha_challenge_field=" + challengeField + "&recaptcha_response_field=" + responseField, | |
async: false | |
}).responseText; | |
if(html == "success") { | |
//Add the Action to the Form | |
$("form").attr("action", "reg.php"); | |
$("#submit").attr("value", "Submit"); | |
//Add the Action to the Form | |
//Indicate a Successful Captcha | |
$("#captcha-status").html("<p class=\"green bold\">Success! Thanks you may now proceed.</p>"); | |
} else { | |
$("#captcha-status").html("<p class=\"red bold\">The security code you entered did not match. Please try again.</p>"); | |
Recaptcha.reload(); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment