dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: onkeyup event issue?

  1. #1
    Join Date
    Jun 2011
    Posts
    4

    onkeyup event issue?

    Hello,

    I have a textbox and it has onkeyup event.
    For example,

    onkeyup = function() {
    //some business logic to get the final value
    //finalValue = blahblahblah;

    this(this is current textbox object).value = finalValue;
    }

    It works ok. However, the issue I have is that...whenever the textbox value is updated, if you typed longer than textbox width, then the cursor position won't locate the last...hard to explain..hum...I guess whenever it is updated, it just set the cursor position the front....

    I could position the cursor always at the last in the keyup event using a sort of javscript, but then I couldn't scroll the all the way first part of textbox value....

    I think there got to be some better way to handle this.
    If your text value is updated in keyup event, how would you preserve current position?

  2. #2
    Join Date
    Feb 2012
    Location
    youTUBE
    Posts
    234
    Find where it went to onChange() and send, sort of an arrow back.

  3. #3
    Join Date
    Jun 2011
    Posts
    4
    Could you be more specific what I need to look?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles