

       
               <table id="Draw_Numbers_Today">
                <thead>
                <tr>
                <th>Time</th>
                <th>Type</th>
                <th>Number</th>
                </tr>
                </thead>
                <tbody>
            
                </tbody>
                </table>
            


    <script>

        function GenerateDrawWinningTodayRow(Type,Time,btnumber){
            let activecheckbox='';
           


//activecheckbox='<input class="form-control" type="checkbox" '+Active+' disabled>';
//const actionbutton =`<button class="btn btn-warning btn-block" onclick="gotoPage('UserModify','${Hashkey}')">View User</button>`;

Time=Time.replace(' ','<br>');
Type=Type.replace(' ','<br>');


return `<tr>
      <td>${Time}</td>
      <td>${Type}</td>
      <td>${btnumber}</td>
  </tr>`;
        }




        async function GenerateDrawsTodayRows(responsearray) {
 
    let newhtmltable = '';

    for (let i = 0; i < responsearray.length; i++) {
       
        newhtmltable += GenerateDrawWinningTodayRow(
            responsearray[i]['type'],
            responsearray[i]['schedule'],
            responsearray[i]['draw_number'],
        );
    }

    //$("#User_list_table").find("tbody").replaceWith(newhtmltable);
   // new DataTable('#User_list_table');


$("#Draw_Numbers_Today").find("tbody").html(newhtmltable);
//new DataTable('#Winning_Numbers_Today');

new DataTable('#Draw_Numbers_Today', {
    language: {
        emptyTable: 'No Draws'
    },
    order: [[0, 'asc']],
    "bDestroy": true
});



$('#draws-today-card').fadeIn(200);


}


function GenerateDrawListTodayTable(draw_numbers_today_target_date=''){
    AjaxDo('?user/list/draw_winning_numbers/', { target_date: draw_numbers_today_target_date}, GenerateDrawsTodayRows, null, reqtype = 'POST');
}


     
GenerateDrawListTodayTable(draw_numbers_today_target_date);

if (home_page_card_html_auto_load_table_content===1){
    setInterval(function () {
    if (currentPage=='Home'){
        GenerateDrawListTodayTable(draw_numbers_today_target_date);
    }
      }, 300000);
}



    </script>