learner
07-16-2002, 03:37 AM
Hi,
I have a textbox.Maxlength is only 3 characters.It allows only numeric values.ie from 0-9.
I have restricted all other characters.But the problem is if the user enters 01 or 010 ,similarly 02 or 020 till 9.It enters in the database as 1 or 2 Which i should not allow as the same value will be stored.
For the first time if the user enters 1 and saves into the database,then again he cannot save 1.But if he enters value as above 01 or 010 it is allowing.What could be done.
Is there any way using javascript to avoid that.
Thanks
learner
I have a textbox.Maxlength is only 3 characters.It allows only numeric values.ie from 0-9.
I have restricted all other characters.But the problem is if the user enters 01 or 010 ,similarly 02 or 020 till 9.It enters in the database as 1 or 2 Which i should not allow as the same value will be stored.
For the first time if the user enters 1 and saves into the database,then again he cannot save 1.But if he enters value as above 01 or 010 it is allowing.What could be done.
Is there any way using javascript to avoid that.
Thanks
learner