I am trying to load a xml page in one of my html page using bootstrap and jquery. in pure simple html I am able to load without any error. e.g.
<!DOCTYPE html>
<html lang="en">
<head>
<title></title>
<meta charset="UTF-8">
<link href="css/style.css" rel="stylesheet">
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
<script>
$(document).ready(function(){
$("#button1").click(function(){
$('#text').load("./collection.html");
alert( "Load was performed." );
});
});
</script>
</head>
<body>
<button id="button1" type="submit">Click Me</button>
<div>
<pre id="text"></pre>
</div>
</body>
</html>
The problem is when I am trying to do same thing in other html page that's using Bootstrap - I am not able to see any contents however I can see the alert message.
Here is my html code with Bootstrap
<script>
$(document).ready(function(){
$("#xmlResponseCollection").click(function(){
$('#txtXmlResponseCollection').load("./collection.html");
alert( "Load was performed." );
});
});
</script>
<tr>
<td><strong>Response</strong></td>
<td>
<button type="button" class="btn btn-info btn-lg" data-toggle="modal"
data-target="#modalXml" id="xmlResponseCollection">Show xml response</button>
<div id="modalXml" class="modal fade" role="dialog">
<div class="modal-dialog modal-lg">
<!-- Modal content-->
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
×
</button>
<h4 class="modal-title">XML Response</h4>
</div>
<div class="modal-body">
<pre id="txtXmlResponseCollection"></pre>
</div>
</div>
</div>
</div>
</td>
</tr>
Any idea how to fix this one?