Codeigniter - Show Information in Modal Window
I answered myself this question.
<td data-title="Edit" align="center"><a href="<?php echo base_url("customer_edit/edit/$customer->cusId"); ?>"><button class="btn btn-primary btn-xs"><i class="fa fa-pencil"></i></button></a> <a data-toggle="modal" href="#<?php echo $customer->cusId; ?>"><button class="btn btn-primary btn-xs"><i class="fa fa-eye"></i></button></a></td>
I edit a href like that href="#<?php echo $customer->cusId; ?>
Afterthat I just write this code on modal top:
<?php foreach ($customers as $get) { ?>
<div class="modal fade" id="<?php echo $get->cusId; ?>" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<?php } ?>
I edit id like that id="#<?php echo $get->cusId; ?>
It works better now!
view full data in modal by particular id in codeigniter using ajax
$(document).ready(function(){
$('.view_data').click(function(){
var id = $(this).attr("id");
console.log(id);
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<button class="btn btn-primary view_data" id="1" >VIEW FULL INFO</button>
How to show a popup modal in codeIgniter?
You are including jQuery more than once, you have actually included jQuery in your head
section, remove those two before your custom javascript, that's why you are getting $(...).modal is not a function
error:
<script src="http://code.jquery.com/jquery-latest.min.js" type="text/javascript"></script>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
Related Topics
How to Add a Space Between Every Sequence of Four Characters (Like a Credit Card Number)
How to Get All Month Record Count in Laravel
Find Combination(S) Sum of Element(S) in Array Whose Sum Equal to a Given Number
How to Pass Checkbox Value 0 If Not Checked and 1 If Checked Using Array Laravel
Disable the Button in the Table Based on the Td Text
In Laravel,How to Use Foreach Loop
Generating a Truly Unique Order Id in PHP
How to Get the Client Ip Address in PHP
How to Catch a PHP Fatal ('E_Error') Error
Dynamic Menu and Role Permission in Codeigniter
How to Get Multiple Data from Two Different Table from One Database in PHP
In Laravel How to Get Data in One Query from 3 Tables
Can You Assign Multiple Variables At Once in PHP Like You Can With Java
Codeigniter - Call to a Member Function Result() on Boolean In