problem with focus() method and input text.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • amit

    problem with focus() method and input text.


    Hello group,

    I'm having a problem with an HTML element performance. When I use
    focus() method to jump to an input text. I realize the cursor is on
    waiting on the 2nd column waiting for user to enter a number. This is
    the HTML part:

    <input id="id_Text_Oct et1" type=text value="" maxlength="3"
    onkeyup="SomeFu nction(event, this.id);" style="border:0 ;width:
    25px"><span style="font-size:18px;">.</span>

    Then in JavaScript there is line of code:

    document.getEle mentById("id_Te xt_Octet" + 1).focus();

    Always user must press backspace in order to be able to type three
    digits.

    I will appreciate it if somebody could give me a hand in this.

    regards,
    ak

  • amit

    #2
    Re: problem with focus() method and input text.

    On May 3, 11:29 am, amit <amit.ko...@gma il.comwrote:
    Hello group,
    >
    I'm having a problem with an HTML element performance. When I use
    focus() method to jump to an input text. I realize the cursor is on
    waiting on the 2nd column waiting for user to enter a number. This is
    the HTML part:
    >
    <input id="id_Text_Oct et1" type=text value="" maxlength="3"
    onkeyup="SomeFu nction(event, this.id);" style="border:0 ;width:
    25px"><span style="font-size:18px;">.</span>
    >
    Then in JavaScript there is line of code:
    >
    document.getEle mentById("id_Te xt_Octet" + 1).focus();
    >
    Always user must press backspace in order to be able to type three
    digits.
    >
    I will appreciate it if somebody could give me a hand in this.
    >
    regards,
    ak

    Got solved.

    Thanks!


    Comment

    • scripts.contact

      #3
      Re: problem with focus() method and input text.

      On May 3, 12:29 pm, amit <amit.ko...@gma il.comwrote:
      Hello group,
      >
      I'm having a problem with an HTML element performance. When I use
      focus() method to jump to an input text. I realize the cursor is on
      waiting on the 2nd column waiting for user to enter a number. This is
      the HTML part:
      Always user must press backspace in order to be able to type three
      digits.
      >
      use the select method before focus


      Comment

      Working...