I am working with Laravel 5, using Blade as template engine taking advantage of the posibilities that this one offers, and using some components of Bootstrap 3. My situation is: I have a view, on which I have a list of teachers (a lot) and every row (every teacher) have a Button to show a Bootstrap Modal where I must to display some information, as personal data, and an list of courses. I was generating a modal for every teacher when the page was loading, but it makes the loading very slow, So, I don't want to generate the a modal for every teacher when the page loads, instead of that I want to generate only a modal and fill it with the appropiate data of the selected teacher.
My principal problem is with the array, I easily can load the plain data as name, surname,phone,address using some hidden input or using the HTML data-attributes. But having a PHP array of courses, how can I load it dinamycally with Javascript or JQuery a list of courses and put it inside a div of the modal?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire