title: wordpress admin ajax not working, returning entire html of page
body: <p>I have following code in my <code>functions.php</code> file.</p>
  
  <pre><code>wp_enqueue_script( 'broadcast-ajax-request', get_template_directory_uri() . '/js/global.js', array( 'jquery' ) );
  wp_localize_script( 'broadcast-ajax-request', 'ajaxadmin', array('ajaxurl'=&gt; admin_url( 'admin-ajax.php' )));
  
  add_action( 'wp_ajax_get_my_option', 'get_my_option' );
  add_action( 'wp_ajax_nopriv_get_my_option', 'get_my_option' );
  
  function get_my_option()
  {
      print_r($_POST); exit;
  }
  </code></pre>
  
  <p>And following code in <code>global.js</code>.</p>
  
  <pre><code>jQuery('document').ready(function(){
    jQuery("#submit_btn").click(function(){
      jQuery.ajax({
          url: ajaxadmin.ajaxurl,
          data: {'action':'get_my_option', 'test':'test'},
          type: "POST",
          success: function(response){
          }
      });
    });
  });
  </code></pre>
  
  <p>But it always returning <code>html</code> code in response.</p>