File: examples/blog/js/jquery-validate/demo/captcha/captcha.js

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil  >  PHP Skeleton Framework  >  examples/blog/js/jquery-validate/demo/captcha/captcha.js  >  Download  
File: examples/blog/js/jquery-validate/demo/captcha/captcha.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 5 years ago
Size: 563 bytes
 

Contents

Class file image Download
$(function(){
	$("#refreshimg").click(function(){
		$.post('newsession.php');
		$("#captchaimage").load('image_req.php');
		return false;
	});
	
	$("#captchaform").validate({
		rules: {
			captcha: {
				required: true,
				remote: "process.php"
			}
		},
		messages: {
			captcha: "Correct captcha is required. Click the captcha to generate a new one"	
		},
		submitHandler: function() {
			alert("Correct captcha!");
		},
		success: function(label) {
			label.addClass("valid").text("Valid captcha!")
		},
		onkeyup: false
	});
	
});
For more information send a message to info at phpclasses dot org.