How to make nested call with jquery
<p>I've below code in JS file:</p>

<pre><code>$(document).ready(function() {
$("#key_verify").click(function () {
    $("#errrmsg").html("&lt;img src=\"/images/shim.gif\"/&gt;");
    if($.trim($("#key").val()).length != 0){
    $.ajax({
    type : "POST",
    cache : false,
    async : true,
    url : "/issuekey?key="+$("#key").val(),
    success : function(data) {
      var json_obj = $.parseJSON(data);
      if(json_obj === undefined || json_obj == null){
      }else{
        if(json_obj.result == "true"){
            top.location.href="/register"
        }else{
            $("#errrmsg").html(invalid_key);
        }
      }
    },
    error : function(data) {
      $("#errrmsg").html(invalid_product_key); 
    }
  });
  }
});
</code></pre>

<p>}</p>

<p>How can I invoke above code in below lines so that when user hits enter key, it should make a call on enter key as well??</p>

<pre><code>$("#key_verify").keypress(function(e) {
    if(e.which == 13){
        ??????
    }
});
</code></pre>

<p>Thanks!</p>
