By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,474 Members | 1,267 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,474 IT Pros & Developers. It's quick & easy.

javascript class and prototype - function doesn't see variables belonging to 'class'

oll3i
100+
P: 679
Expand|Select|Wrap|Line Numbers
  1. function myClass(modul,var1,var2,var3,var4,var5,var6,var7,var8,domainURL){
  2. this.modul=modul;
  3. this.var1=var1;
  4. this.var2=var2;
  5. this.var3=var3;
  6. this.var4=var4;
  7. this.var5=var5;
  8. this.var6=var6;
  9. this.var7=var7;
  10. this.var8=var8;
  11. this.domainURL=domainURL;
  12.  
  13. this.prototype.display() {
  14. display code
  15. }
  16.  
  17. }
  18.  
  19.  
this.prototype.display() doesn't see eg this.var1 (or any other variable belonging to myClass)?

thank You
Jun 9 '08 #1
Share this Question
Share on Google+
2 Replies


oll3i
100+
P: 679
i solved it thank you :)
Jun 9 '08 #2

acoder
Expert Mod 15k+
P: 16,027
Good to know, but the question is how.
Jun 9 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.