I have something like this
if(window.Test==null)
{
window.Test = {};
Test.usrTZ = Test.getTZ( new Date().getTimezoneOffset() );
Test.getTZ = function(offset)
{
.....
return offset;
};
}
The line Test.usrTZ = Test.getTZ( new Date().getTimezoneOffset() ); throws in Chrome an error "Uncaught TypeError: undefined is not a function". I in general use traditional object notation, but want to learn how to use this one. I'm not sure what I'm doing wrong here - any help is much appreciated!