title: Is it possible that I can call another event handler inside an event?
body: <p>I have these two set of codes, one is to prompt whenever the button is clicked,</p>
  
  <pre><code>$('.button_class').click(function(){
      var baker_url = base_url + 'baker/baker/manage/Bread/1';
      var answer = confirm('Are you sure?');
      if(answer == true){
          // if this is true, i will call an external script so that within this condition that process will be executed
      }
      else if(answer == false){
          return false; // exits
  }
  });
  </code></pre>
  
  <p>and then this piece of code right here is the one responsible for executing the process when the button is clicked,</p>
  
  <pre><code>$('.another_button_class').click(function(e){
          e.preventDefault();
          var baker_url = base_url + 'baker/baker/manage/Bread/1';
          var form    = '#'+ $(this).attr('rel');
          var url     = $(form).attr('action');
          var target  = '#'+ $(form).attr('rel');
              $(target).slideUp();
              $.post(url, $(form).serialize(),function(data) {
                  $(target).html(data).slideDown(function(){
                      if(data == '&lt;div class="ok"&gt;Added&lt;/div&gt;'){
                      setTimeout(refresh,1000)
                      c();
                      window.location = baker_url; // sets the url after refreshing
                      }
                  });
  
              });
      });
  </code></pre>
  
  <p>in the first function, when <code>answer == true</code>, i want to execute the latter function (<em>the one with the process execution when button is clicked</em>). </p>
  
  <p>Is it really possible that I can call an another function or event handler to execute its process inside another function? </p>