title: JavaScript prototype 'this' issue
body: <p>This is a follow up question from my last question.</p>
  
  <p><a href="https://stackoverflow.com/questions/13996187/simple-javascript-prototype-issue">Simple javascript prototype issue</a></p>
  
  <p>I am a bit new using JavaScript <code>prototype</code> so sorry for the second post.</p>
  
  <p>I want to assign the clicked element <code>id</code> to the <code>this.name</code> array.</p>
  
  <pre><code>task.prototype.init=function(){  
        this.name=[];  //this.name array has to be defined here
  
          for (var i; i&lt;5; i++){
              var Link=document.createElement('a');
                  Link.innerHTML='click';
                  Link.id=value[i];   //I want to assign the value to the this.name array
                  Link.href='#'
                  Link.onclick=this.changeName;
                  document.body.appendChild(Link);
           }
  }
  task.prototype.changeName=function(){  
  
       //How do I push the this.id to the property this.name?
  
       //the code below won't work because this refer to the &lt;a&gt; element. 
       this.name.push(this.id);     
  
      return false;
      }
  </code></pre>
  
  <p>Any tips for the task?</p>