title: Updating a model with a keyup event in Backbone app
body: <p>I am trying to update a model on every keyup event. The model's attributes will be used in the template. So they should be defined before page load. I have defined them <code>null</code>. But when something is typed I cannot read them updated from the console.</p>
  
  <p>What is the proper way to do this? What is my missing point?</p>
  
  <p>loginview fragment:</p>
  
  <pre><code>events: {
              'keyup input' : 'updateModel',
              'click #loginbutton' : 'login',
              'click #renderregisterbutton' : 'render_register',
          },
          updateModel: function(e){
              e.preventDefault();
              var elm = e.target;
              FormsDataModelInst[ elm.id ] = $( elm ).val();
              this.model.set( FormsDataModelInst );
              console.log( "1-FormsDataModelInst:" + JSON.stringify( FormsDataModelInst.attributes ) );
              console.log( "2-this.model.set(...):" + JSON.stringify(this.model.attributes) );
              console.log( e );
              console.log( e.target );
              console.log( elm );
              console.log( elm.id );
              console.log( $( elm ).val() );              
          },
  </code></pre>
  
  <p>formsdatamodel:</p>
  
  <pre><code>define([
      'underscore',
      'backbone',
      ],
      function(_, Backbone) {
          var FormsDataModel = Backbone.Model.extend({
  
              urlRoot: null,
  
              defaults: {
                  username: null,
                  phone: null,
                  email: null,
              },
          });
  
          return new FormsDataModel();
  });
  </code></pre>