I want to refresh the div tag or the table when i click the button. Just refresh it so that the record will update on the screen. I have no idea on how i ganna code it. I searched but i dont get those codes.
html
<html>
<head>
<base target="_top">
<script>
</script>
</head>
<body>
<div id="tables">
<? var data = getData();?>
<table id="tableShift1">
<caption>Shift1</caption>
<th> ID </th>
<th> Ldap </th>
<th> Action </th>
<? for (var dataList = 1; dataList < data.length; dataList++) {
if (data[dataList][2] == '') {?>
<tr >
<td><?= data[dataList][0] ?></td>
<td><?= data[dataList][1] ?></td>
<td><button onclick='google.script.run.setApproved("<?=data[dataList][0]?>")' id='btnLdap'>Approve</button></td>
</tr>
<? }
} ?>
</table>
</div>
</body>
<script>
</script>
</html>