|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
SOLVED != help in javascript
Hi,
I have a form with a textbox called fldDate. I want to ensure that the user enters DD/MM/YYYY. I am using a simple way of doing this by checking if the value they enter is not 10 this is my code if (theform.fldDate.length!=10) missing += "\nPlease ensure that Date is in DD/MM/YYYY format\n"; The problem is that even if the vale is 10 characters long it still rejects it. Am is using incorrect syntax? Thanks UPDATE SOlved this issue realised it needed to be .value.lenght!=10 |
|
#2
|
||||
|
||||
|
theForm.fldDate is object (of type textbox) while you needs the string which is its value:
if (theform.fldDate.value.length!=10) ... |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > != help in javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|