Re: Form checking a text box for content

by "Darrell King" <darrell(at)webctr.com>

 Date:  Sat, 3 May 2003 08:06:08 -0400
 To:  <hwg-basics(at)mail.hwg.org>,
"jim" <jim(at)haslam.com>
 References:  haslam
  todo: View Thread, Original
Two ways I can think of:

1) Server-side: if the form is submitted and the required field is empty,
the user is returned to the form with both fields empty and an error message
explaining the problem.

2) Client-side: use JavaScript to check the value of the 1st box when the
2nd one is focused on (onfocus()).  Then pop up an alert().

D


----- Original Message -----
From: "jim" <jim(at)haslam.com>
To: <hwg-basics(at)mail.hwg.org>
Sent: Friday, May 02, 2003 9:54 PM
Subject: Form checking a text box for content


Hey Gurus!

Can a form with several text fields on it be checked to see if one
particular text field is filled in before it allows another field to have
content entered? I'm not looking for a required text field thing, but
rather something that won't let you continue until something is completed
or has content.

Thanks!

Jim H

HTML: hwg-basics mailing list archives, maintained by Webmasters @ IWA