I already have implemented an ajax that send a tr and td to a html table every time that a element from the table of the DB is updated, i'll like to send the ajax html data to a append and send it from there to the body and not directly from ajax to the body, any one knows hoy? this is my php:
<?php if($total>0 && $search!='')
{
do {
echo "<tr><form method='post' action='modifystatusdown.php'>
<td style='width:20%; '><input type='text'><input type='hidden'>";
echo $fila['nombre'];
echo "</td><td style='width:20%;'>";
echo $fila['telefono'];
echo "</td><td style='width:20%;'>";
echo "<input type='Submit' name='delete' value='Atendido'></td></form></tr>";
}
while ($fila=mysqli_fetch_assoc($resultado));
} ?>
this is send it to this ajax:
$(document).ready(function()
{
function actualizar()
{
value = $('#value').html();
$.ajax(
{
type: "POST",
url: "../solicitudes/buscador.php",
success: function(data)
{
$('#value').html(data);
}
})
}
setInterval(actualizar, 3000);
})
finaly from ajax its send it to a table inside a div:
<div class="container">
<table id="value">
</table>
</div>
how could i send it to the append and then to the table? instead directly from ajax?
the idea is something like this, in a table of the database I have a status column which is initialized to 0 and every time someone requests a service from an application android status is changed to 1, that I mentioned above is working, I want to achieve is that every time status is equal to 1, then appears in a html page , just as already appears in the html page, the problem is that assigned an input field where you can type in the text field the service to be assigned to the user requesting and as the table where they are inserted into the html refreshes every 5 seconds and you can not write in the text because it cleared everytime refreshes the table automatically ,