Welcome Guest, Not a member yet? Register   Sign In
Bootstrap Dynamic Modal View With AJAX
#1

I'm using codeigniter v3 with bootstrap v3.
In a view file, I've a table for user messages and for every message, there is a button to show messages details with bootstrap modal. I handle this in a way that I think is not efficient! In a foreach loop, I put <tr> element and at the bottom (before ending loop), I put whole structure of bootstrap modal. In fact, If there is 7 rows in table, when I view page source, there is 7 modals with different details based on every message.
My question is: how could I handle this with ajax calling? I mean, I put a modal (as template) after the loop, and when clicked on details button, based on message id, use ajax calling and put details of message in modal. (a dynamic  modal with ajax calling)
thanks.
Reply


Messages In This Thread
Bootstrap Dynamic Modal View With AJAX - by pb.sajjad - 03-07-2016, 07:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB