EDIT Forgot to show the html i am using.
<div id="console">
</div>
function console(){
var id = document.getElementById('console');
this.add = add;
function add(message){
this.id.innerHTML = message;
}
}
con = new console();
con.add("testing message");
Why does this not work?
I get the error, (taken from firebug);
this.id has no properties
[Break on this error] this.id.innerHTML = message;