Quote:
Uncaught typeerror: cannot read property 'value' of null
This is a very common error which occurs, when trying to access the
member of an object which is
null
.
Fix: Validate for
null
value before accessing the
members
, but you will have to check why it is
null
at the first place, make sure the
DOM
contains the element with the id
stateSelect
var optVal = dijit.byId("stateSelect");
if( optVal != null && optVal.item != null )
console.log(optVal.item.value);