Hi
I'm writing a basic class using prototype.js in which some class vars are set when the class is initialised - the problem is that these variables aren't available to other methods within the class.
var Session = Class.create({
initialize: function(){
// define defaults
this.source = '';
},
shout: function(){
alert(this.source);
}});
I know it's something to do with scope and I'm sure it's a fairly basic issue - all help appreciated!
Thanks, Adam