How to select text in textbox control

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mudassir368
    New Member
    • Jul 2007
    • 7

    How to select text in textbox control

    How to select text in textbox control, if it is focussed using javascript
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    hi ...

    have a look at the following example:

    [HTML]<input type="text" name="my_name" value="test_tex t" onfocus="this.s elect();">[/HTML]

    so you may use the select(); method.

    kind regards

    Comment

    • mudassir368
      New Member
      • Jul 2007
      • 7

      #3
      Originally posted by gits
      hi ...

      have a look at the following example:

      [HTML]<input type="text" name="my_name" value="test_tex t" onfocus="this.s elect();">[/HTML]

      so you may use the select(); method.

      kind regards

      hi,

      thank u very much for code snip

      Comment

      • gits
        Recognized Expert Moderator Expert
        • May 2007
        • 5388

        #4
        ;) no problem ... glad to help you ... post again at TSDN when you have more questions ...

        kind regards

        Comment

        Working...