how to edit code when the change the pagination next page and edit on modal
how to edit code when the change the pagination next page and edit on modal

<?php
include("common/config.php");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Free HTML5 Bootstrap Admin Template</title>
<!-- The styles -->
<?php include("common/headcss.php"); ?>
<!-- jQuery -->
</head>
<body>
<!-- wrapper -->
<div id="wrapper">
<!-- navbar top -->
<?php include("common/header.php"); ?>
<!-- end navbar top -->
<!-- navbar side -->
<?php include("common/sidebar.php"); ?>
<!-- end navbar side -->
<!-- page-wrapper -->
<div id="page-wrapper">
<div class="row">
<!-- Page Header -->
<div class="col-lg-12">
<h1 class="page-header">Collages </h1>
</div>
<!--End Page Header -->
</div>
<div class="row">
<div class="col-lg-12">
<!-- Advanced Tables -->
<div class="panel panel-primary">
<div class="panel-heading">
<i class="fa fa-bar-chart-o fa-fw"></i> Collages Details
<div class="pull-right">
<div class="btn-group">
<a href = "#" class = "btn btn-default btn-xs" role = "button" data-toggle="modal" data-target="#addcollage_modal">Add Collage</a>
</div>
</div>
</div>
<div class="panel-body">
<div class="box col-sm-12">
<table class="table table-bordered datatable responsive table-hover" id="grid-commands">
<thead>
<tr>
<th data-column-id="srno" data-type="numeric">Sr No</th>
<th data-column-id="c_name">Collage Name</th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false">Action</th>
</tr>
</thead>
<tbody>
<?php
$i=1;
$srno=0;
$select_all=$con->selectAllData("master_collage");
while($row=$select_all->fetch_assoc()){
?>
<tr>
<?php $rowID = $row['id']; ?>
<td><?php echo ++$srno; ?></td>
<td><?php echo $row['collage_name']; ?></td>
<td>
<a href="#?c_id=<?php echo $i; ?>" clg-id="<?php echo $row['id']; ?>" clg-name="<?php echo $row['collage_name']; ?>"
data-toggle="modal" data-target="#editcollage_modal" class="clg-edit btn btn-success btn-xs fa fa-pencil-square-o"></a>
<button class="btn btn-danger btn-xs"><i class="fa fa-trash-o "></i></button>
</td>
</tr>
<?php $i++; } ?>
</tbody>
</table>
</div>
</div>
<!--/span-->
</div>
</div>
</div>
</div>
<!-- end page-wrapper -->
</div>
<!-- Edit Collage Modal -->
Edit Collages
">
Close
<?php
include("add_collages.php");
include("common/copy.php");
include("common/table.php");
?>
<script type="text/javascript">
var c_id="";
var clg_name="";
$(document).ready(function() {
$('#editcollage_modal').on('show.bs.modal', function (e) {
frm_coll_edit.clg_id.value=c_id;
frm_coll_edit.txtcollage_name.value=clg_name;
});
$('.clg-edit').click(function(){
c_id=$(this).attr('clg-id');
clg_name=$(this).attr('clg-name');
});
//Setting footer to bottom
$("#grid-basic").bootgrid();
$("#grid-data").bootgrid({
ajax: false,
post: function ()
{
/* To accumulate custom parameter with the request object */
return {
id: "b0df282a-0d67-40e5-8558-c9e93b7befed"
};
},
url: "/api/data/basic/",
formatters: {
/* "link": function(column, row)
{
return "<a href=\"manufacturing.php?p_id=" + row.id + "\">" + column.id + "</a>";
},*/
"commands": function(column, row)
{
return "<a href=\"collages.php\" data-toggle=\"modal\" data-target=\"editcollage_modal\">" + column.id + "</a>";
}
}
});
});
</script>
</body>
</html>
This discussion has been closed.
Answers
how to edit value from click next button on pagination