Error: ” is undefined


Error: ” is undefined.

Description: JavaScript or jQuery error which shows up when a variable is not assigned with any value.

Solution: Check the variable isĀ undefined or null before processing.

Read More – Good reference of JavaScript undefined.

Advertisements

Error: Microsoft JScript runtime error: Unable to get value of the property ”: object is null or undefined


Error: Microsoft JScript runtime error: Unable to get value of the property ”: object is null or undefined

Description: A JavaScript related error which comes from the browser scripting engine. When the JavaScript Interpreter start parsing and executing any script codes, but unable to find the document element, then this error throws up. Because the document element or object is not found or not exist on page so that the object is return as null. null is actually an object value indicating that a variable references nothing in particular. Some browsers ignore this error but some just throws it.

Example:

function window.onload()
{
  document.getElementById("txtMe").focus();
}

Solution: Avoid such errors by putting an object null reference check.

function window.onload()
{
  if (document.getElementById("txtMe") != null)
  {
    document.getElementById("txtMe").focus();
  }
}

Read: How Browser Works