I am having quite a hard time in solving this problem. Seemed so simple but it is not for me.
PAGE1: HTML
<!-- where to land the external page, but not necessary -->
<div id='feito'></div>
//Javascript calling the page:
$(document).ready(function(){
$.get("page_with_modal.html", function(data) {
$("#feito").html(data);
});
});
//Javascript showing the Modal with ID doneModal:
$(document).on('ready', function(){
$('#doneModal').modal('show');
});
PAGE2: page called from JS (page_with_modal.html):
<html>
<head>
</head>
<body>
<div class="modal fade" id="doneModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="myModalLabel">Modal title</h4>
</div>
<div class="modal-body">
... MODAL TEXT
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script src="../bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
PROBLEM: From what I can understand, The page is called but the Modal is not appearing.
-I tried to put bootstrap.js at the bottom of PAGE1, JS code before or after the landing DIV. Nothing -I tried to eliminate all HTML - Body, etc tags and rename it .php (with all the correct sintax). Nothing. - PAGE2 can be called from PHP using require(). Working ok, no problem. - I didnt explore the ajax call because the final result (this is an easy/standard mockup) it's already inside and Ajax call, I am trying to make things work from the root up.
What am I doing wrong? Can somebody help me? Roberto