AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Now we can implement the function for this task in controller file.Ready to go First I can give you a short description about todays article.I think all of you are aware of Bootstrap as guys interested in web development field.Bootstrap is the most popular CSS framework in wed designing.
But still its not a stable version and still in developing stage. But Bootstrap 3.3.7 is a very decent and strong version which is going to be used today for this article. Im going to display details of each record in database in a Bootstrap modal component. Here you can watch a short video clip to get the abstract idea of what will you learn today. Ajax Crud Pagination Modals Bootstrap Php Download Codeigniter AndAs we did before download Codeigniter and make a project folder.Then prepare the essential configurations for a Codeigniter project. If you are not aware of it, vist the below link to get an idea. Ajax Crud Pagination Modals Bootstrap Php Download Source CodeEssential-configurations-to-start-codeigniter-project Download Source Code from here: Bootstrap-Modal-fetch Configurations. First I will create the model file to fetch data from database. ![]() Now we are going to create the controller file to pass the data to the views. First I have included the phone details in a table to show in a proper format. For our ease, I always use jQuery DataTable plugin to implement the table with sorting and searching functionalities. It should ope up a modal when get clicked and display the data of a particular phone ID. So now, jQuery click function is executed to load the modal using this button class. Carefully look at the line where I have included the view button. You can see I have given it an ID with the value of each phones ID. Now we get this ID value and store it in a variable called phoneData. Here AJAX joins the party An Ajax request is sent to the server with data called phoneData. If data is processed correctly then callback function should be executed(success function). If it founds a result, then it will be printed on the Bootstrap modal; within the section called phoneresult. The results should be echoed through the controller function.
0 Comments
Read More
Leave a Reply. |