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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form Error Handling

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi E$verybody,

I'm trying to work out how to have an Input Box that can validate

If someone types in nothing it'll display an error message.
I'm trying the below but its not working?

SrchStrLen = len(SearchString)

if left(SearchString, 1) = "" then
SrchStrLen = SrchStrLen-1
reponse.write "Error Error"
end if

 
if you're going to do it server-side:

SrchStrLen = len(SearchString)

if SrchStrLen = 0 then
response.write "Error Error"
end if

you can also do it client-side with javascript, but i'm not so good with javascript, can someone else provide that solution?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top