Witajcie,
  1. var questionsClass = Class.create({
  2. initialize: function() {
  3.  
  4. },
  5. showQuestion: function(type) {
  6. var obj = $('say');
  7. a = new Element('a')
  8. a.setAttribute('href', '#')
  9. a.onclick = function(){
  10. this.test()
  11. }
  12. a.innerHTML = 'wybierz'
  13.  
  14. obj.appendChild(a)
  15. });
  16. },
  17.  
  18. onFailure: function(){
  19. alert('Something went wrong...');
  20. }
  21. });
  22. },
  23.  
  24. test: function() {
  25. alert('cos');
  26. }
  27. });

chcialbym funkcje "test" odpalic na onclick ale przez this.test() nie dziala