Subversion Repositories SmartDukaan

Rev

Rev 4609 | Rev 5145 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4609 Rev 4656
Line 42... Line 42...
42
	trackPaymentOptionFormSubmission();
42
	trackPaymentOptionFormSubmission();
43
	return true;
43
	return true;
44
}
44
}
45
 
45
 
46
function verifyCodSelectionForm(formName){
46
function verifyCodSelectionForm(formName){
47
	var captcha_response_input = $("form[name='" + formName + "'] :input[name='captcha_response_field']");
47
	var captcha_response_input =$("form[name='" + formName + "'] :input[name='captcha_response_field']");
48
	if(captcha_response_input.val() == ''){
48
	var entered_text =  $.trim(captcha_response_input.val());
-
 
49
	if(entered_text == '' || entered_text == 'Enter the characters shown'){
49
		dispError("Please enter the characters shown.");
50
		dispError("Please enter the characters shown.");
-
 
51
		captcha_response_input.blur();
50
		return false;
52
		return false;
51
	}
53
	}
52
	trackPaymentOptionFormSubmission();
54
	trackPaymentOptionFormSubmission();
53
	return true;
55
	return true;
54
}
56
}
Line 58... Line 60...
58
	return true;
60
	return true;
59
}
61
}
60
 
62
 
61
function dispError(error){
63
function dispError(error){
62
	alert(error);
64
	alert(error);
63
}
-
 
64
65
}
-
 
66
 
-
 
67
$('#captchaanchor').click(function () { $('#captchaImage').attr('src', '/captcha?rand=' + Math.floor(Math.random()*100) ); });
-
 
68
 
-
 
69
$('#captcha_response_box').val('Enter the characters shown')
-
 
70
	.focus(function(){
-
 
71
		if ($(this).val() == 'Enter the characters shown') {
-
 
72
			$(this).val('');
-
 
73
			$(this).removeClass('captcha_text_blur');
-
 
74
			$(this).addClass('captcha_text_focus');
-
 
75
		}
-
 
76
	})
-
 
77
	.blur(function(){
-
 
78
		if ($(this).val() == '') {
-
 
79
			$(this).val('Enter the characters shown');
-
 
80
			$(this).removeClass('captcha_text_focus');
-
 
81
			$(this).addClass('captcha_text_blur');
-
 
82
		}
-
 
83
	});
-
 
84
65
85