Click here to Skip to main content
15,897,891 members

Comments by Member 11686005 (Top 17 by date)

Member 11686005 1-Sep-15 14:42pm View    
I send all code to read and help me.?
Member 11686005 1-Sep-15 7:45am View    
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Captcha</title>
<script type="text/javascript">
/* Function to Generat Captcha */
function GenerateCaptcha() {
//var chr1 = Math.ceil(Math.random() *10) + '';
//var chr2 = Math.ceil(Math.random() * 10) + '';
//var chr3 = Math.ceil(Math.random() * 10) + '';

var str = new Array(4).join().replace(/(.|$)/g, function () { return ((Math.random() * 36) | 0).toString(36)[Math.random() < .5 ? "toString" : "toLowerCase" ](); });
var captchaCode = str + chr1 + ' ' + chr2 + ' ' + chr3;
document.getElementById("txtCaptcha").value = captchaCode
}

/* Validating Captcha Function */
function ValidCaptcha() {
var str1 = removeSpaces(document.getElementById('txtCaptcha').value);
var str2 = removeSpaces(document.getElementById('txtCompare').value);

if (str1 == str2) return true;
return false;
}

/* Remove spaces from Captcha Code */
function removeSpaces(string) {
return string.split(' ').join('');
}
</script>
</head>
<body >
<div style="border: 2px solid gray; width: 700px;">

Generating Captcha Demo



Enter the Captcha Text:
<input type="text" id="txtCompare" />
<input type="text" id="txtCaptcha" style="text-align: center; border: 2px dashed red; background-image:url(captcha/1.jpg) font-weight: bold; font-size: 20px; font-family: Modern" />
<input type="button" id="btnrefresh" value="Refresh" />
<input id="btnValid" type="button" value="Check" />

<br />
<br />
</div>
</body>
</html>
Member 11686005 1-Sep-15 2:28am View    
i search bout cant find
so thanks to answer
Member 11686005 31-Aug-15 10:11am View    
I send completely code in first comment. Please help me.?
Member 11686005 31-Aug-15 10:10am View    
Yes I have js. But when I clicked check don't send to href locations.