Instead of the classic captcha you can have a field with the question, what is 2 +2 and he has to put 4 indicate otherwise error?
Thanks
stefano
Thanks
stefano
<div class="form_item">
<div class="form_element cf_textbox">
<label class="cf_label" style="width: 150px;">What is <span id='x1'> </span> + <span id='x2'> </span> ? (verification)</label>
<input class="cf_inputbox required validate-number" maxlength="150"
size="15" title="" id="veri" name="veri" type="text" />
<a class="tooltiplink" onclick="return false;">
<img height="16" border="0" width="16" class="tooltipimg" alt=""
src="components/com_chronocontact/css/images/tooltip.png" />
</a>
<div class="tooltipdiv">What is X + Y ? (verification) :: This verification is to prevent abuse of this system.</div>
</div>
<div class="cfclear"> </div>
</div>
<div class="form_item">
<div class="form_element cf_button">
<input value="Submit" name="submit" id='submit' type="submit" />
</div>
<div class="cfclear"> </div>
</div>
Form JavaScriptwindow.addEvent('load', function () {
// user verification
var x1 = Math.floor(Math.random()*10) + 1;
//console.log(x1);
var x2 = Math.floor(Math.random()*10) + 1;
$('x1').innerHTML = x1;
$('x2').innerHTML = x2;
var veri = $('veri');
$('submit').disabled = true;
veri.addEvent('change', function() {
if ( veri.value == x1+x2 ) {
$('submit').disabled = false;
} else {
$('submit').disabled = true;
}
});
});
veri.addEvent('change', function() {
to veri.addEvent('keyup', function() {
which should fire the code after each keypress rather than 'onChange' which requires the extra click in IE.