Skip to main content

Posts

Showing posts from June, 2019

Codeigniter get current route name in view file

Codeigniter get current route name in view file using single line Today we will learn how to get current route name in codeigniter view files or in view php files. We can do this by using single line code $this->uri->segment(1); this code will give you current route name from url. Example URL mywebsite.com/users/robert So for above example this code will give you " users " as output so by using this method  you can simply get the current route name. Thank you.

HTML Table Pure JS LIVE search for all columns

HTML Table Pure JS LIVE search for all columns Hello, Today we learn how to add live search for html without jQuery .  Why we are using PURE JS ? jQuery syntax is easy and simple compare to javascript but sometimes  jQuery have conflict issues with other libraries and also it takes more time compare to javascript. So here is the full code and js function to add search in html table HTML CODE   <input id="dls_search_input" onkeyup="search_table()" type="text" />    <table class="dls-table dls-table-element" id="dlsTableAirline"> <thead> <tr> <th>First Name</th> <th>Last Name</th> <th>Email</th> </tr> </thead> <tbody>   <tr>   <td>Jackson</td> <td>Doe</td>   <td>john@gmail.com</td> </tr> <tr> <td>