kaoskorruption
Programmer
I need a variable from within a class to be accessable from outside the class AND within other functions that are inside the class.
function test ( ) {
this.name = name;
this.div = createElement ( "div" );
body.appendChild ( this.div );
function name ( ) {
alert ( this.div.style.left );
}
}
var test = new test ( );
test.name ( );
When I try to do this, I get there error: this.div in function "name" has no properties. Using firefox. Whats the problem?
function test ( ) {
this.name = name;
this.div = createElement ( "div" );
body.appendChild ( this.div );
function name ( ) {
alert ( this.div.style.left );
}
}
var test = new test ( );
test.name ( );
When I try to do this, I get there error: this.div in function "name" has no properties. Using firefox. Whats the problem?