Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javascript inheritance issue.

 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, I have the following code:



If I return this._id or this._classid in the function tostring(), 'sam' and 'sam's class' get alerted successfully. However, for some reason, this._icontrol is always 'undefined'. I'm not sure what I'm doing wrong. Or maybe what I'm trying to do isn't possible? Just trying to super a DOM element to a parent 'class'.

Thanks,

Justin
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check this article out: http://www.kevlindev.com/tutorials/javascript/inheritance/inheritance10.htm

Eric
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the link, it really helped me out!

Justin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic