Can someone tell me what I'm doing wrong here? I create a table which has a delete button in each row, when clicked pops up an modal and asks if I want to delete the row. But when i click on the button nothing happens. Why is this happen?(I suspect it may be because of the INNER JOIN) Any ideas how to solve this?
list_book.php (INNER JOIN):
<table class="table table-bordered table-hover" id="datatable">
<thead>
<tr>
<th>Número</th>
<th>Estante</th>
<th>Obra</th>
<th>Autor</th>
<th>Categoria</th>
<th>Ano Escolaridade</th>
<th>Observação</th>
<th class="text-center">Opções</th>
</tr>
</thead>
<tbody>
<?php
$query = "SELECT B.number, B.shelf, B.title, B.author, B.obs, C.category_name, S.scholarity_name FROM book AS B
INNER JOIN category AS C ON C.id_category=B.category_id INNER JOIN scholarity AS S ON S.id_scholarity=B.scholarity_id";
$res = mysql_query($query);
mysql_set_charset('utf-8');
if (!$res) {
echo "Erro ao executar a query";
} else {
while ($dados = mysql_fetch_array($res)) {
?>
<tr>
<td><?php echo $dados['number']; ?></td>
<td><?php echo $dados['shelf']; ?></td>
<td><?php echo $dados['title']; ?></td>
<td><?php echo $dados['author']; ?></td>
<td><?php echo $dados['category_name']; ?></td>
<td><?php echo $dados['scholarity_name']; ?></td>
<td><?php echo $dados['obs']; ?></td>
<td class="text-center">
<span class="fa fa-edit"></span> Editar
<a class="btn btn-danger btn-xs" data-toggle="modal" data-target="#<?php echo $dados['id']; ?>" data-whatever="#mdo"><span class="fa fa-trash"></span> Apagar</a>
<?php include('modal_delete.php'); ?>
</td>
</tr>
<?php
}
}
?>
</tbody>
</table>
MODAL(BOOTSTRAP):
<div class="modal" id="<?php echo $dados['id_book']; ?>" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title text-left">Apagar</h4>
</div>
<div class="modal-body text-left">
<p>Deseja apagar este registro?</p>
</div>
<div class="modal-footer">
Apagar
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</div>
</div>
</div>
delete_book.php
<?php
session_start();
require("../../conexao/conexao.php");
$id = $_GET["id"];
$query= "DELETE FROM book WHERE id_book = $id";
$delete= mysql_query($query);
if(!$delete){
echo "Erro!! Não foi possivel apagar dado.";
}
else{
echo"Dado removido com sucesso!";
header("Location: ../list/list_book.php");
}?>
I'm new on this so if something's wrong... please help me.
You must not do your delete request with GET , Create a form instead of anchor , and place a button inside it. make your request with post method
When you should use get & post request
Change this line :
$query= "DELETE FROM book WHERE id_book = $id";
to
$query= "DELETE FROM book WHERE id_book = ".$id;
Related
This question already has answers here:
Reference - What does this error mean in PHP?
(38 answers)
Closed 2 years ago.
i am trying to display and update read/unread messages. I have a column in database msg_read, that is by default has a value of 0. 0 means read, and 1 means unread. Need guidance to update the status when the message is read. With the guidance of Mr. Andre, the unread messages are showing Bold now, but when read, messages become normal (not bold).
<!-- Display User Messages Details Starts Here -->
<div class="tab-pane userprof-tab" id="tab-10">
<div class="table-responsive border-top">
<table class="table table-bordered table-hover mb-0 text-nowrap">
<thead>
<tr>
<th>Name</th>
<th>Jetski</th>
<th>Sender Email</th>
<th>Phone</th>
<th>Post Code</th>
<th>Message Date</th>
<th>Message</th>
</tr>
</thead>
<tbody>
<?php
$SelectBoat = mysqli_query($con, "SELECT * FROM seller_contact WHERE seller_id='$user_id'");
while($row=mysqli_fetch_assoc($SelectBoat)){
$full_name = $row['full_name'];
$boatname = $row['boatname'];
$sender_email = $row['sender_email'];
$phone = $row['phone'];
$post_code = $row['post_code'];
$message = $row['message'];
$msg_date = $row['msg_date'];
$seller_id = $row['seller_id'];
$msg_read = $row['msg_read'];
?>
<?php
if(msg_read=="0"){
echo '<tr style="font-weight:900">
<td><?php echo $row['full_name'];?></td>
<td><?php echo $row['boat_name'];?></td>
<td><?php echo $row['sender_email'];?></td>
<td><?php echo $row['phone'];?></td>
<td><?php echo $row['post_code'];?></td>
<td><?php echo $row['msg_date'];?></td>
<td>
<!-- View Message -->
<i class="fa fa-eye"></i>
<!-- View Message -->
<!--****** View Message Modal ******-->
<div class="modal fade" id="view<?php echo $row['id'];?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><strong>From <?php echo $row['sender_email'];?></strong> </h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p style="word-wrap: break-word; white-space: initial;"><?php echo $row['message'];?></p>
</div>
</div>
</div>
</div>
<!--****** End View Message Modal ******-->
</td>
</tr>'
} ?>else {
echo '<tr>
<td><?php echo $row['full_name'];?></td>
<td><?php echo $row['boat_name'];?></td>
<td><?php echo $row['sender_email'];?></td>
<td><?php echo $row['phone'];?></td>
<td><?php echo $row['post_code'];?></td>
<td><?php echo $row['msg_date'];?></td>
<td>
<!-- View Message -->
<i class="fa fa-eye"></i>
<!-- View Message -->
<!--****** View Message Modal ******-->
<div class="modal fade" id="view<?php echo $row['id'];?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><strong>From <?php echo $row['sender_email'];?></strong> </h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p style="word-wrap: break-word; white-space: initial;"><?php echo $row['message'];?></p>
</div>
</div>
</div>
</div>
<!--****** End View Message Modal ******-->
</td>
</tr>'
} ?>
<?php } ?>
</tbody>
</table>
</div>
</div>
I found some errors in your code and some structural failures.
if you are working with PHP in a HTML page, use alternative syntax
see:
https://www.php.net/manual/en/control-structures.alternative-syntax.php
you don't need to rewrite the complete row again for the read message, only put a condicional on the style attribute.
you was calling read_msg instead of $read_msg
new code:
<div class="tab-pane userprof-tab" id="tab-10">
<div class="table-responsive border-top">
<table class="table table-bordered table-hover mb-0 text-nowrap">
<thead>
<tr>
<th>Name</th>
<th>Jetski</th>
<th>Sender Email</th>
<th>Phone</th>
<th>Post Code</th>
<th>Message Date</th>
<th>Message</th>
</tr>
</thead>
<tbody>
<?php while ($row = mysqli_fetch_assoc($SelectBoat)) : ?>
<?php
$full_name = $row['full_name'];
$boatname = $row['boatname'];
$sender_email = $row['sender_email'];
$phone = $row['phone'];
$post_code = $row['post_code'];
$message = $row['message'];
$msg_date = $row['msg_date'];
$seller_id = $row['seller_id'];
$msg_read = $row['msg_read'];
?>
<tr <?= ($msg_read == "0") ? 'style="font-weight:900"' : '' ?>>
<td><?php echo $row['full_name']; ?></td>
<td><?php echo $row['boat_name']; ?></td>
<td><?php echo $row['sender_email']; ?></td>
<td><?php echo $row['phone']; ?></td>
<td><?php echo $row['post_code']; ?></td>
<td><?php echo $row['msg_date']; ?></td>
<td>
<!-- View Message -->
<i class="fa fa-eye"></i>
<!-- View Message -->
<!--****** View Message Modal ******-->
<div class="modal fade" id="view<?php echo $row['id']; ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title"><strong>From <?php echo $row['sender_email']; ?></strong> </h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<p style="word-wrap: break-word; white-space: initial;"><?php echo $row['message']; ?></p>
</div>
</div>
</div>
</div>
<!--****** End View Message Modal ******-->
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
</div>
</div>
UPDATE:
to update the status of the message just like i told you in the commnent. add this to your code:
add this sttribute to your view button:
onclick="readMSG(this, '<?php echo $row['id']; ?>')"
add this script and modify to work in your case:
<script>
function readMSG(attribute, id) {
$(attribute).parent().parent().css('font-weight', 'normal')
$.ajax({
type: "GET",
url: "readmsg.php",
data: {
id: id
},
success: function (){
$(attribute).parent().parent().css('font-weight', 'normal')
}
});
}
</script>
the php controller file readmsg.php:
$update = mysqli_query($con, "UPDATE `seller_contact` SET `read_msg`=1 WHERE `id` =" . $_GET['id']);
if ($update) {
return ['success' => 'success'];
} else {
return ['error' => 'error'];
}
try to understand the code and adapt to work in your case. if work, don't forgot to accept the answer ;)
I have a dynamic table with edit and delete button. I was able to passed the variable $parid to modal. However, it's not fetching the data into the modal using the $parid. I cannot figure out what have i missed out. I just want to display the corresponding data using mysql code WHERE parid='$parid'. The value of $parid is passed to the <input type="text" name="parid" id="parid">. Here's my sample code:
<table id="example" class="table table-striped" >
<thead>
<tr>
<th>Param ID</th>
<th>Decription</th>
<th>Code</th>
<th></th>
</tr>
</thead>
<tbody>
<?php
require 'lab/db/dbcon.php';
$query = $con->query("SELECT * FROM param");
while($row=mysqli_fetch_array($query)){
?>
<tr>
<td><?php echo $row['parid'];?></td>
<td><?php echo $row['parnam']; ?></td>
<td><?php echo $row['parcod']; ?></td>
<td>
<!--edit button here-->
<a href="" class="btn btn-danger btn-xs btndel" data-toggle="modal" data-id="<?php echo $row['parid']; ?>" data-target="#delpar"><i class="fa fa-trash"></i>
</a>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
<!-- Start Delete Par Modal -->
<div class="modal fade" id="delpar" role="dialog">
<div class="modal-dialog modal-sm">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h5 class="modal-title"><i class="fa fa-exclamation-circle"></i> Are you sure to delete this record?</h5>
</div>
<div class="modal-body">
<input type="text" class="form-control" name="parid" id="parid" disabled>
<table id="example" class="table table-bordered">
<thead>
<tr>
<th>Decription</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<?php
require 'lab/db/dbcon.php';
$parid=isset($_POST['parid']);
$query = $con->query("SELECT * FROM param WHERE parid ='$parid' ");
while($row=mysqli_fetch_array($query)){
?>
<tr>
<td><?php echo $row['parnam']; ?></td>
<td><?php echo $row['parcod']; ?></td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
<div class="modal-footer" style="padding:10px;">
<button type="button" class="btn btn-danger" name="btndel" id="btndel>"> <i class="fa fa-check"></i>
</button>
<button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-remove"></i></button>
</div>
</div>
</div>
</div>
<!-- End Delete Par Modal -->
<script>
$(document).on("click", ".btndel", function () {
var parid = $(this).data('id');
$(".modal-body #parid").val( parid );
$('#delpar').modal('show');
});
</script>
You have lost track of the scope and timing of your PHP and jQuery code. The jQuery part:
<script>
$(document).on("click", ".btndel", function () {
var parid = $(this).data('id');
$(".modal-body #parid").val( parid );
$('#delpar').modal('show');
});
</script>
runs on the users browser after they have viewed what came from the server. The PHP code inside your "Delete Par Modal" runs on the server before the jQuery even gets to the browser.
In your jQuery you need to add an AJAX call to get the data you need FROM THE SERVER (where your query then runs and returns the data) in real time. Then "on success" the AJAX call should populate the Modal fields.
Hello i want to pass my news_id to the twitter modal. But im getting a wrong data Can someone give me ideas on how to pass a data to the modal?
i delete the news with news_id "29"
and the deleted data is news with news_id "28"
here is my code.
<div class="container">
<table class="table table-bordered" >
<thead>
<tr>
<th width="60">ID</th>
<th width="200">News Title</th>
<th width="150">Date Posted</th>
<th>Content</th>
<th width="200">Image</th>
<th width="200">Action</th>
</tr>
</thead>
<tbody>
<?php
$stmt = mysqli_prepare($con, "SELECT * FROM news ORDER BY news_id");
mysqli_stmt_execute($stmt);
$result = mysqli_stmt_get_result($stmt);
while($row = mysqli_fetch_array($result)){
?>
<tr>
<td><?php echo $row['news_id']; ?></td>
<td><?php echo $row['news_title']; ?></td>
<td><?php echo $row['news_date']; ?></td>
<td><?php echo $row['news_content']; ?></td>
<td><img style="height:150px; width:200px;" src="<?php echo $row['news_image']; ?>" ></td>
<td>
<a class='btn btn-info left-margin' href="edit2.php?newsid=<?php echo $row['news_id'];?>" ><span class="glyphicon glyphicon-edit"></span> Edit</a>
<a class='btn btn-danger delete-object' data-toggle="modal" data-target="#myModal"><span class="glyphicon glyphicon-remove"></span> Delete</a>
<div class="modal fade" id="myModal" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-body">
Are you sure you want to delete this?
</div>
<div class="modal-footer">
<a class='btn btn-danger left-margin' href="delete.php?newsid=<?php echo $row['news_id'];?>" >Yes</a>
<button type="button" class="btn btn-default" data-dismiss="modal">No</button>
</div>
</div>
</div>
</div>
</td>
</tr>
<?php
}
?>
</tbody>
</table>
</div>
here is my delete.php
<?php
include_once('connection.php');
$newsid = $_GET['newsid'];
if(isset($newsid)){
$stmt = mysqli_prepare($con, "DELETE FROM news WHERE news_id = ?");
mysqli_stmt_bind_param($stmt, "s", $newsid);
mysqli_stmt_execute($stmt);
header('location: edit.php');
}
?>
The error resides in the way you declare your modals.
Your first delete button for news_id 28 opens the modal with the id #myModal, but so does the second button for news_id 29, which opens the first modal with id #myModal, being the modal for news_id 28.
Proposed solution: Add the ID to the modal.
<a class='btn btn-danger delete-object' data-toggle="modal" data-target="#modal<?php echo $row['news_id'];?>"><span class="glyphicon glyphicon-remove"></span> Delete</a>
and
<div class="modal fade" id="modal<?php echo $row['news_id'];?>" role="dialog" aria-labelledby="myModalLabel">
should fix it.
i'm trying to delete a row from my table using a bootstrap modal delete confirmation.
But the problem is, when i try to delete the one row mon my table, the one that gets deleted is the first row(always). Why is this happen? Any ideas?
HTML(table)
<table class="table table-bordered table-hover clearfix" id="example">
<thead>
<tr>
<th>ID de Funcionário</th>
<th>Sobrenome</th>
<th>Nome</th>
<th>Cargo</th>
<th>Telefone</th>
<th class="text-center">Opção</th>
</tr>
</thead>
<tbody>
<?php
$query="SELECT * FROM employee AS E ORDER BY name";
$res = mysql_query($query);
mysql_set_charset('utf-8');
if(!$res){
echo "Erro ao executar a query";
}
else{
while($dados=mysql_fetch_array($res)){
?>
<tr>
<td><?php echo $dados['func_id']; ?></td>
<td><?php echo $dados['last_name']; ?></td>
<td><?php echo $dados['name']; ?></td>
<td><?php echo $dados['position']; ?></td>
<td><?php echo $dados['phone']; ?></td>
<td class="text-center">
<a class="btn btn-danger btn-xs" data-toggle="modal" data-target="#delete" data-whatever="#mdo">
<span class="fa fa-trash">Apagar</span>
</a>
<?php include('modal_delete.php');?>
</td>
</tr>
<?php
}}
?>
</tbody>
Modal_delete.php(include)
<div class="modal" id="delete" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
<h4 class="modal-title text-left">Apagar</h4>
</div>
<div class="modal-body text-left">
<p>Deseja apagar este registro?</p>
</div>
<div class="modal-footer">
Apagar
<a type="button" class="btn btn-default" data-dismiss="modal">Cancelar</a>
</div>
</div>
</div>
Delete_reg.php
<?php
require("../../conection/conection.php");
$id =$_GET["id"];
$query= "DELETE FROM employee WHERE idemployee= $id";
$delete= mysql_query($query);
if(!$delete){
echo "erro!! não foi possivel apagar dado.";
}
else{
echo"Dado removido com sucesso!";
header("Location: ../list/list_reg.php");
}?>
All the possible solution that i found on the website don't solve my problem... can someone please help me? Thank you!!!
Say you have 5 rows. That means for each row, you generate a modal. Each of these 5 modals has id="delete". When you click on the link to open the modal, the bootstrap code opens up the first modal that matches $('#delete'), which means it will delete the first row.
You have two solutions:
You add in the echo $dados['idemployee']; in the delete button's data-target, and in the modal's id. (Not optimal, because you're still generating a modal's worth of code per table row)
You make only 1 modal, and add a click() event to the delete button, which updates the Apagar button's href with the proper id.
I am new to programming and trying to implement bootstrap modal to display row data from a mysql table into the modal window.
I have tried the solution found on stackoverflow "Pull information from mysql table to bootstrap modal to edit" by link. But could not able to display the particular row with the $row['SFID'].
I can pull table data but when I click the edit button in front of any row it always show the last row id
and doesn't display the data in the input box on the modal to edit the data???.
Here I am till now, Please help me out.
<table class="table table-bordered" width="100%">
<thead>
<tr>
<th>SFID</th>
<th>Company</th>
<th>Product</th>
<th>Product Line</th>
<th>Dealer Class</th>
<th>Status</th>
</tr>
</thead>
<?php
$query = "SELECT * FROM tblcustomer";
$stmt = $db->prepare($query);
$stmt->execute();
foreach ($stmt as $row): ?>
<tr>
<?php $rowID = $row['SFID']; ?>
<td><?php echo $row['SFID']; ?></td>
<td><?php echo $row['CompanyName']; ?></td>
<td><?php echo $row['Product']; ?></td>
<td><?php echo $row['ProductLine']; ?></td>
<td><?php echo $row['DealerClass']; ?></td>
<td><?php echo $row['RequestStatus']; ?></td>
<td style="text-align: center">
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-danger" href="#delModal" data-toggle="modal"><i class="icon-trash icon-white"></i> Delete</a>
<?php echo "<a class='btn update' href='#editModal' data-sfid='".$row['SFID']."' role='button' data-toggle='modal'>Edit</a>"; ?>
</div>
</div>
</td>
</tr>
<?php endforeach; ?>
</table>
<div id="editModal" class="modal hide fade in" style="display: none; ">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Edit Customer Details</h3>
</div>
<div>
<form class="contact">
<fieldset>
<div class="modal-body">
<?php echo $row['SFID']; ?>
<ul class="nav nav-list">
<li class="nav-header">SFID</li>
<li><input class="input-xlarge" type="text" name="mysfid" id="mysfid"></li>
<!--<li class="nav-header">Company</li>
<li><input class="input-xlarge" value=" " type="text" name="mycompany"></li>
<li class="nav-header">Dealer Class</li>
<li><input class="input-xlarge" value=" " type="text" name="mydealerclass"></li> -->
</ul>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-success" id="submit">Approved</button>
Close
</div>
</div>
<script>
$(document).ready(function(){
$('a.edit').click(function(){
var sfid = $(this).data('sfid');
var company = $(this).data('company');
var dealerclass = $(this).data('dealerclass');
$('#mysfid').val(sfid);
$('#mycompany').val(company);
$('#mydealerclass').val(dealerclass);
});
});
</script>
Thanks for your help.
<table class="table table-bordered" width="100%">
<thead>
<tr>
<th>SFID</th>
<th>Company</th>
<th>Product</th>
<th>Product Line</th>
<th>Dealer Class</th>
<th>Status</th>
</tr>
</thead>
<?php
$query = "SELECT * FROM tblcustomer";
$result = mysql_query($query);
$i=1;
while($row = mysql_fetch_assoc($result))
{
?>
<tr>
<?php $rowID = $row['SFID']; ?>
<td><?php echo $row['SFID']; ?></td>
<td><?php echo $row['CompanyName']; ?></td>
<td><?php echo $row['Product']; ?></td>
<td><?php echo $row['ProductLine']; ?></td>
<td><?php echo $row['DealerClass']; ?></td>
<td><?php echo $row['RequestStatus']; ?></td>
<td style="text-align: center">
<div class="btn-toolbar">
<div class="btn-group">
<a class="btn btn-danger" href="#delModal" data-toggle="modal"><i class="icon-trash icon-white"></i> Delete</a>
<a class="btn update" href="#editModal<?php echo$i?>" data-sfid='"<?php echo $row['SFID'];?>"' data-toggle="modal">Edit</a>
<!--Yor Edit Modal Goes Here-->
<div id="editModal<?php echo $i; ?>" class="modal hide fade in" role="dialog" ria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<a class="close" data-dismiss="modal">×</a>
<h3>Edit Customer Details</h3>
</div>
<div>
<form class="contact">
<fieldset>
<div class="modal-body">
<?php echo $row['SFID']; ?>
<ul class="nav nav-list">
<li class="nav-header">SFID</li>
<li><input class="input-xlarge" type="text" name="mysfid" id="mysfid"></li>
<!--<li class="nav-header">Company</li>
<li><input class="input-xlarge" value=" " type="text" name="mycompany"></li>
<li class="nav-header">Dealer Class</li>
<li><input class="input-xlarge" value=" " type="text" name="mydealerclass"></li> -->
</ul>
</div>
</fieldset>
</form>
</div>
<div class="modal-footer">
<button class="btn btn-success" id="submit">Approved</button>
Close
</div>
</div>
</div>
</div>
</td>
</tr>
<?php $i++; } ?>
</table>
take $i = 1 above for loop and increament it in each iteration of for loop..so it will take each records
Your Form
<a class='btn update' href='#editModal<?php echo $i;?>' data-sfid='".$row['SFID']."' role='button' data-toggle='modal'>Edit</a>
Modal Window
<div id="editModal<?php echo $i;?>" class="modal hide fade in" style="display: none; ">
That's because you fill the edit modal with the $row data, which by then, is on the last item.
To get data for a specific row, you could create a javascript object/array and then fetch the data by making use of the data-rfid parameter in the "Edit" link. Or you can fetch the row with Ajax for example.