8 Replies Latest reply on Apr 20, 2009 1:29 PM by wvxvw

    Solid way to check an object exist or not without generating an error

    webvalue Level 1



      To check if an Object exists or not, I have seen people do this:


      if (objectName) {






      In my case, if it doesn't exist, I got an error instead: "Cannot access a property or method of a null object reference".  So how do you check to know for sure an object doesn't exist but not cause an error in the meantime?