Entry
Is it possible to jump automatically to following textfields if the value of input field is equal 1
Aug 11th, 2006 16:18
David Alden, Harald S.,
yes it is :)
<html>
<script type="text/javascript" language="javascript">
function changeSelection(event){
if(event.keyCode == 49 && event.target.value == 1){
document.thisForm.thisTextarea.select();
document.thisForm.thisTextarea.focus();
}
}
</script>
<form name="thisForm">
<input type="text" name="thisText"
onchange="changeSelection(event)" onkeyup="changeSelection(event)">
<textarea name="thisTextarea" >Some sample
text</textarea>
</form>
</html>