title: How to send ajax request in wordpress without displaying zero
body: <p>I am trying to send ajax request to another php page in wordpress. But every time it returns zero with other results.I need to remove the zero. I tried die(); to remove the zero. But after calling this, whole screen becomes blank. My code is below,</p>
  
  <p>Jquery,</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function key_press(){
      jQuery.ajax({
  url  : '&lt;?php echo get_admin_url()?&gt;admin-ajax.php',
  type : 'POST',
  data : jQuery('[name="ans_name"]').serialize()
  }).done(function(result) {
  // ta da
  //alert("success");
  jQuery("#widget_poll_id").html(result);
  
  });
  }
  
  &lt;/script&gt;   
  </code></pre>
  
  <p>PHP,</p>
  
  <pre><code>  add_action( 'wp_ajax_nopriv_'.$_POST['ans_name'], 'my_ajax' );
    add_action( 'wp_ajax_'.$_POST['ans_name'], 'my_ajax' );
  
  
    function my_ajax() {
  
      echo $_POST['ans_name'];
  
    die();
  
  }
  </code></pre>
  
  <p>How could I get rid of from this situation ?</p>