i make a data entry form in asp, now i want when user enter data and press Enter key, cursor must jumps to next field, and then next, and in last it saves records, someone help me please
thanks
You have to capture the keypress with javascript and use the tabindex to got to the next field.
This code will only work in Internet Explorer
HTML Code:
<script type="text/javascript">
function ret2tab(obj) {
var indexNo = obj.tabIndex;
var keyCode = event.keyCode;
var ele = document.getElementById("testform").elements[indexNo];
if (keyCode == 13) {
event.keyCode = 0;
ele.focus();
ele.select();
}
}
</script>
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares? Code Samples | People Counting System
hi
thx i m working on it, its working now, but wehn its reaching at save button its getting hands, or stuck, well thx for your reply i will send u codes after it
thanks