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

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

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>

Thanks!!! It worked!!!! :) yippiieee.........

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

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