|
-
Mar 1st, 2001, 05:02 PM
#1
Thread Starter
Member
Hello,
I think this is easy, but iam not able to figure it out.
*****
I have a "UserName" textbox on a html page.
I wrote some javascript validation which checks if the user does not enter any data in the text box and alerts him with a message, before submitting the form.
But if the user enters spaces(using SpaceBar on the key board), my javascript code is not able to handle that.
Can any body please send me a sample javascript code to handle this case.
*****
Urgent please.
Thanks,
Srini
-
Mar 1st, 2001, 07:46 PM
#2
Member
hmmm
is there no Trim() function in java, or maybe trying doing this,
Code:
if (left(username,1) == " ") { .......
perhaps it might work.
-
Mar 2nd, 2001, 04:24 AM
#3
Frenzied Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|