SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    New Jersey
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    0 is null or not an object

    On the page: http://www.healthylivingnyc.com/find...h.php?cat_id=1
    You can replicate this error by choosing an Activity sub-type from the drop down select list.

    I am recieving the following errror message: "0 is null or not an object"

    the line number corresponds to the following line:

    "if ( a[d][0] == intType ) {"

    What does that mean? Why is it null or not an object?

    Thanks !!!

  2. #2
    SitePoint Addict Guimauve's Avatar
    Join Date
    Aug 2004
    Location
    Chicago
    Posts
    255
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You have 67 items defined in the arItems but when I look at the value of a.length it comes back as 68.

    So in your loop you are going one too far( a[67][0] ). I don't know why a.length is 68 instead of 67.

    ??

    Charles

  3. #3
    SitePoint Enthusiast
    Join Date
    Jul 2004
    Location
    New Jersey
    Posts
    38
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Guimauve
    You have 67 items defined in the arItems but when I look at the value of a.length it comes back as 68.

    So in your loop you are going one too far( a[67][0] ). I don't know why a.length is 68 instead of 67.

    ??

    Charles
    Thanks Charles!! That was it!! what was happening was that the PHP was producing a list like: [298,322,'African',false],[297,312,'Aikido',false],[299,331,'Anusara',false],[299,332,'Ashtanga',false],

    with a comma at the end of it! Thus counting an extra item!!

    I never would have seen that ... thanks a million!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •