Positioning the cursor in a textarea

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

    #1

    Positioning the cursor in a textarea

    Can someone suggest how I can either position the cursor at the beginning of
    a specified line in a textarea or select the whole of a specified line in a
    textarea?

    Thanks,
    Geoff


  • Martin Honnen

    #2
    Re: Positioning the cursor in a textarea



    Geoff Soper wrote:
    [color=blue]
    > Can someone suggest how I can
    > select the whole of a specified line in a
    > textarea?[/color]

    Possible for Mozilla browsers:
    <http://www.faqts.com/knowledge_base/view.phtml/aid/32415/fid/130>
    IE/Win has a text range API that in theory should allow that but my
    attempts so far have failed as within a textarea that API gives strange
    results as soon as line breaks are involved.

    --

    Martin Honnen
    http://JavaScript.FAQTs.com/

    Comment

    Working...