Connecting Tech Pros Worldwide Forums | Help | Site Map

Clear text area with button click

Targa
Guest
 
Posts: n/a
#1: Jul 20 '05
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
Guest
 
Posts: n/a
#2: Jul 20 '05

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="document.formname.textareaname.value = '';">

HikksNotAtHome
Guest
 
Posts: n/a
#3: Jul 20 '05

re: Clear text area with button click


In article <1067931532.277473@cache5.usenetserver.com>, "Targa"
<targa1SPAMSUCKS@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
Thomas 'PointedEars' Lahn
Guest
 
Posts: n/a
#4: Jul 20 '05

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="document.formname.textareaname.value = '';">[/color]

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


PointedEars

Closed Thread