0

hi..

currently i am working on a webpage designing project. I have to include CAPTCHA in my webpage. My doubt is , usually in text boxes , users will be able to get already entered values by just pressing the arrow key. In the case of CAPTCHA this must be disabled( in text box were I receive the user input for validation) How will I make this property set in a text box?? Any kind of suggestion would be of great help.

Thanks in advance

4
Contributors
6
Replies
10
Views
7 Years
Discussion Span
Last Post by pandup
0

For disabling the up and down arrow keys try this:

<script type="text/javascript">
document.onkeydown=function(){return event.keyCode==38 || event.keyCode==40 ? false : true;}
</script>

or

<script>
document.getElementById(id).onkeydown=function(){return event.keyCode==38 || event.keyCode==40 ? false : true;}
</script>

where id is the id of your form

Edited by george61: n/a

0

I don't have the code of your Captcha form but I think this should work:

<html>
<head>
</head>
<body>
<form name="forma">
<input type="submit" value="submit">
<input type="text" name="textform" autocomplete="off">
</form>
</body>
</html>
0

dear george61
the way you mention above about solve this problem by javascript not recommended
becuae javascript can be disabled dear .
the last way by using autocomplete="off" very nice
thanks

0

i has placed captcha to my contact form and has written styles to the input field for the value to enter catcha code but the styles are effected on chrome but not in firefox and ie; can any one suggest to get styles in firefox and ie

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.