Clear text area with button click

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

    #1

    Clear text area with button click

    How can I clear a text field by clicking on a button?

    Ive searched the web and found tons of scripts that will clear text just
    entered but I am displaying results from a database into a text area field.
    I need to be able to click a button and clear the field completely - not
    just the text that was just entered.

    BTW - There is only one field on the form so a routine that will clear an
    entire form would work.

    TIA



  • Mikhail Esteves

    #2
    Re: Clear text area with button click

    Targa, on Tue, 04 Nov 2003 01:38:54 -0600, had to say:
    [color=blue]
    > How can I clear a text field by clicking on a button?[/color]

    <input type="button" value="Clear"
    onlick="documen t.formname.text areaname.value = '';">

    Comment

    • HikksNotAtHome

      #3
      Re: Clear text area with button click

      In article <1067931532.277 473@cache5.usen etserver.com>, "Targa"
      <targa1SPAMSUCK S@alltel.net> writes:
      [color=blue]
      >BTW - There is only one field on the form so a routine that will clear an
      >entire form would work.[/color]

      <input type="reset" value="Clear The Form" />
      --
      Randy

      Comment

      • Thomas 'PointedEars' Lahn

        #4
        Re: Clear text area with button click

        Mikhail Esteves wrote:
        [color=blue]
        > Targa, on Tue, 04 Nov 2003 01:38:54 -0600, had to say:[color=green]
        >> How can I clear a text field by clicking on a button?[/color]
        >
        > <input type="button" value="Clear"
        > onlick="documen t.formname.text areaname.value = '';">[/color]

        <input
        type="button"
        value="Clear"
        onlick="this.fo rm.elements['textareaname'].value = '';">


        PointedEars

        Comment

        Working...