title: Undefined class variables in Javascript
body: <p>This is my code - </p>
  
  <pre><code>function searchString(usrLogin) {
  
    var setUsrLogin = function (usrLogin) {
      this.usrLogin = (usrLogin == "") ? "*" : usrLogin;
    }
  
  
    this.toString = function(){
      return 'source="dbmon-dump://Source/ID" ' + 'USR_LOGIN="' + this.usrLogin + '" ';
    }
  
    setUsrLogin(usrLogin);
  }
  
  $(function() {
    var a = new searchString("");
    $('#searchBar').val(a.toString());
  });
  </code></pre>
  
  <p><code>a.toString()</code> prints source="dbmon-dump://Source/ID" USR_LOGIN="undefined" because <code>this.usrLogin</code> shows up as undefined. What am I doing wrong?</p>