Wednesday, 29 October 2014

Create Simple Popup in CodeIgniter

1) Create button : (controller)



$button = "<a href='#' data-toggle='modal' data-target='#myId' class='btn btn-mini btn-red btnId' id='btnId' title='My ID'><i class='icon'></i> ID </a>";


2) Design the popup : (view)






<div id="myId" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="" aria-hidden="true" style="left:50%; width:50%">

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
        <h3 id="myId">My ID</h3>
    </div>

    <div class="modal-body">
        <?php echo tbs_form_open('', array('id'=>'my_id'));?>
        <div id="table_myid"></div>
        <?php echo form_close();?>    
    </div>

</div>


Disediakan oleh :
Che Wahida Binti Che Pauzur

0 comments:

Post a Comment