0

Does someone have a working example where multiple remote links have to be loaded into the modal? What I want is a datatable and when one clicks on a link in the row, I want to open the edit page for that row. e.g. edit.php?id=xyz.

My example works only for the first row I want to edit, when I click on a different row, the content of the first row is loaded.

I've been searching and this topic was the closest, however it does not work for bootstrap 3.2.0

Twitter bootstrap remote modal shows same content everytime

Community
  • 1
  • 1
user3253002
  • 1,521
  • 3
  • 21
  • 43
  • The `remote` modal feature is being deprecated. You're better off implementing the loading functionality you need yourself. – cvrebert Aug 17 '14 at 07:42

1 Answers1

2

The Bootstrap modal usage says that the remote content will be loaded one time. So, what you have to do is remove the content of the modal when you close it. That will allow new content to be loaded.

$('body').on('hidden.bs.modal', function(e) {
    $(e.target).removeData('bs.modal').find('.modal-content').empty();
});
azeós
  • 4,853
  • 4
  • 21
  • 40