jamesjmann Posted February 26, 2011 Share Posted February 26, 2011 I doubt "form jumping" is the actual name for what I need help with, but basically I'm looking for a script that will make the cursor jump to the next form after a certain number of characters has been typed. I've tried about three or four different scripts but none of them worked for me. Anyone know of a simple-to-use script for this? Quote Link to comment https://forums.phpfreaks.com/topic/228864-form-jumping/ Share on other sites More sharing options...
nogray Posted February 26, 2011 Share Posted February 26, 2011 You can add on onkeypress event that will check the length of the input value and focus to the next field. You can review the example below (make sure to use the right id) <input type="text" onkeypress="if (this.value.length >= 5) document.getElementById('next_field').focus();" /> <input type="text" id="next_field" /> Quote Link to comment https://forums.phpfreaks.com/topic/228864-form-jumping/#findComment-1179831 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.