Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Textarea Validate

Status
Not open for further replies.

paragvshah

Programmer
Jan 11, 2001
109
IN
Hi friends,

I have done my site in coldfusion & i want to validate a textarea field on a page that if it is blank then it should give a alert message as there is no validate parameter in coldfusion as it is for textfield.

please provide me a script.

parag.
 
This is kind of a Javascript deal but Here's an idea:

<script language=&quot;javascript&quot;>
function validate(Arg)
{
If (Arg.texta.value==&quot;&quot;)
{
alert(&quot;Please Enter Text in TextArea&quot;);
}
}
</script>



<form name=&quot;TestForm&quot;>
<p>
<TEXTAREA rows=2 cols=20 id=texta name=texta>
</TEXTAREA><br>
<input type=&quot;submit&quot; onClick=&quot;validate(this.TestForm)&quot;>
</p>

</form>

Have fun...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top