Error checking a text area field

I’m trying to set up error checking on a text field. It works with regular fields, and checkboxes, but I can’t seem to get it to check an text field.

I have a Verify agent that runs after the form is saved:

'Check theQuestion  field...

If Trim( InformationRequest.Question(0)) = "" Then

	

	InformationRequest.Errors = InformationRequest.Question(0) &_

	|&nbsp<B>FIELD:</B>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp<A | &_

	|ONCLICK=" LinkToTextAreaErrors( 'Question' ); return false"| &_ 

	|HREF="">Question</A> | &_

	|must be not be blank.<BR>|

	

End If

End Sub

In the javascript header I have this, which will allow the user to focus on the text area and start typing when in Edit mode:

ThisDoc = document.forms[0];

function LinkToTextAreaErrors (Name_Of_Field_With_Error)

{

    	if ( location.href.toUpperCase().indexOf( "EDITDOCUMENT" ) > -1 ) 

    		{ 

    		ThisDoc .elements[Name_Of_Field_With_Error].focus();

		}



      else

		{

		window.alert ("YOU MUST CLICK ON THE 'EDIT' BUTTON TO MAKE CHANGES.");

		}

}

Subject: Error checking a text area field

convoluted. Why not check for the error with JS before they submit?

Anyway, you didn’t tell us what the symptoms were. What is happening? How far does it get? Are you getting a LS error or a JS error?

Subject: RE: Error checking a text area field

Sorry it was so confusing. I am doing the error checking with Javascript before they submit.

I can error check every field, except for a text field.

My question is: How do I error check a text field?