title: How to call a js function from jquery keypress event
body: <p>I have this function defined</p>
  
  <pre><code>function updateMapMarker(inputValue)
  {
      geocoder.geocode({'address': inputValue}, function(results, status) 
      {
          if (status == google.maps.GeocoderStatus.OK)
          {
              if (results[0])
              {
                  placeMarker(results[0].geometry.location);
              }
              else
              {
                  alert('No results found');
              }
          }
          else
          {
              alert('Geocoder failed due to: ' + status);
          }
      });
  }
  </code></pre>
  
  <p>And I added a keypress event into an input like this:</p>
  
  <pre><code>$('#tutor_singin_address').keypress(function (e)
  {
      if(e.keyCode==13)
      {
          updateMapMarker( $('#tutor_singin_address').val());
      }
  });
  </code></pre>
  
  <p>But console is throwing this error:</p>
  
  <pre><code>Uncaught ReferenceError: updateMapMarker is not defined 
  </code></pre>
  
  <p>How can I call my js function?</p>