title: my function entering to infinite loop when call AJAX?
body: <p>The send_data function Called from createNewTable function(onclick).
  i dont understand why my function entering to infinite loop when action_id === "new_table_btn"(action_id it's indicator ). Please help me</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;button type="submit" class="btn btn-default" onclick="createNewTable()"&gt;Send&lt;/button&gt;
  </code></pre>
  
  <p><strong>JQuery/Ajax</strong></p>
  
  <pre><code>function createNewTable()
  {
      _table_name = $("#table_name").val();
      var data = "Indicator=new_table&amp;table_name=" + _table_name + "&amp;player_email=" + player_email;
      send_data(data, "new_table_btn");
  }
  
  
  function send_data(j_data, action_id) {
  
      var results;
      //var k_data =  [{aaaa:"solange"}];
      $.ajax({
          url: "SrvController",
          dataType: 'json',
          type: 'post',
          //contentType: 'application/json', 
          data: j_data, // "Indicator=world_games&amp;player_email=dana@mmm.com", //"aaaa=lllll&amp;aaa=pppp",//JSON.stringify(k_data),
          //processData: false,
          success: function (data, textStatus, jQxhr) {
  
  
              if (action_id === "join_table")
              {
  
                  // turn_place =
                  if (data["status"] === "success")
                  {
                      player_place = data["sit"];
                      $("#playground").hide("slow", arguments.callee);
                      $("#startGame").show("slow");
                      if (!read_data)
                      {
                          new_round_data();
                          read_data = true;
                      }
                  }
  
                  else
                      $("#playground").append("fail");
  
              }
              if (action_id === "world_games")
              {
                  read_activ_tables(data);
              }
              if (action_id === "new_round_data")
              {
                  new_round(data);
              }
              if (action_id === "get_table_id")
              {
                  _table_number = data["tableNumber"];
                  var data = "Indicator=join_table&amp;table_id=" + _table_number + "&amp;player_email=" + player_email;
                  send_data(data, "join_table");
  
              }
              if (action_id === "new_table_btn")
              {
                  if (typeof data !== "undefined")
                      _table_number = data["tableId"];
  
                  player_place = "1";
                  $("#playground").hide("fast", arguments.callee);
                  $("#startGame").show("slow");
                  if (!read_data)
                  {
                      read_data = true;
                      new_round_data();
  
                  }
  
              }
  
          },
          error: function (jqXhr, textStatus, errorThrown) {
              console.log(errorThrown);
          }
      });
      //results.innerHTML = "processing...";
  }
  </code></pre>