Select Function

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

    #1

    Select Function

    Hello,

    I have seen the select function used on forms fields, and it
    usually takes place immediately after a setfocus call is made.
    However, after adding the code to a test page, I don't see what it
    does. Can anyone tell me what exactly it does?

    Thanks,
    Attila
  • David Dorward

    #2
    Re: Select Function

    Attila wrote:
    [color=blue]
    > Hello,
    >
    > I have seen the select function used on forms fields, and it
    > usually takes place immediately after a setfocus call is made.
    > However, after adding the code to a test page, I don't see what it
    > does. Can anyone tell me what exactly it does?[/color]

    IT selects the contents of the field...

    Compare Test 2 and Test 5: http://dorward.me.uk/www/ph/test.html

    --
    David Dorward <http://dorward.me.uk/>

    Comment

    • Lee

      #3
      Re: Select Function

      Attila said:[color=blue]
      >
      >Hello,
      >
      > I have seen the select function used on forms fields, and it
      >usually takes place immediately after a setfocus call is made.
      >However, after adding the code to a test page, I don't see what it
      >does. Can anyone tell me what exactly it does?[/color]

      If the field contains any text, the text is selected. That is,
      it appears highlighted, and typing in that field will replace
      the current contents. If your test page has empty fields, you
      won't see anything, because there is no text to select.

      Comment

      • Attila

        #4
        Re: Select Function

        That helps. Thanks for the responses!

        Attila

        Comment

        Working...