Jump to content

Form Jumping


jamesjmann

Recommended Posts

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?

Link to comment
Share on other sites

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" />

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.