-
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
-
hmmm
is there no Trim() function in java, or maybe trying doing this,
Code:
if (left(username,1) == " ") { .......
perhaps it might work.
-