|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Identify null value using javascript
How do i identify null values using javascripts' length property
e.g.say mystring is variable holding the valueof my data to be tested. mystring = <%=(Results.Fields.Item("Postion").Value)%> If (mystring.length=0) document.write ("close to"); else document.write (mystring & "is perfect"); ) please check whether the above code is correct. incase you find the answer please send mail to URL |
|
#2
|
||||
|
||||
|
You should have '==' in the if statement and not '='
|
|
#3
|
|||
|
|||
|
Thankx
but i figured out the problem. infact i should have had declared mystring = in " " which i didn't do it and hence there was error. |
![]() |
| Viewing: Dev Shed Forums > Web Design > JavaScript Development > Identify null value using javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|