#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Location
    bombya, INDIA
    Posts
    2
    Rep Power
    0

    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 ndbhatt@hotmail.com
  2. #2
  3. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Oct 2001
    Location
    New Zealand
    Posts
    1,774
    Rep Power
    25
    You should have '==' in the if statement and not '='
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2002
    Location
    bombya, INDIA
    Posts
    2
    Rep Power
    0

    Thumbs up javascript problem


    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.

IMN logo majestic logo threadwatch logo seochat tools logo