Gurus, sorry to ask this question in this forum.
But I need to use a Wizard type windows in my app. I am creating a class
called Wizard and gets initialized fine. But when nextClicked is called,
it is not finding the value of currSection. I tried many ways to
initialize, but it doesn't work. Appreciate if someone could let me what
I am doing wrong.
Wizard = Class.create();
Wizard.prototype = {
currSection: 0,
sections: null,
initialize: function( elem, next, previous) {
this.container = $(elem);
//this.currSection = 0;
this.sections = $$('#' + elem + ' .section');
Event.observe( $(next), 'click', this.nextClicked);
Event.observe( $(previous), 'click', this.previousClicked);
alert( this.currSection);
this.openSection( this.sections[0]);
},
nextClicked: function(event) {
alert( this.currSection); //says 'undefined'
this.currSection++;
alert( this.currSection); //says 'NaN'
alert( this.sections); //says 'undefined'
this.openSection( this.sections[this.currSection]);
}
....
}
Thanks in advance
Booshan Rengachari
_______________________________________________
Javawin mailing list
[email protected]
http://mail.xilinus.com/mailman/listinfo/javawin_xilinus.com