Does your responce contain the entire modal structure?
Cause on this line
<br />
$('#myModal').html(response);<br />
You will be changing the entire modal structure, for example, if your modal structure is
<div class="modal hide fade" id="myModal">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3>Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<a href="#" class="btn">Close</a>
<a href="#" class="btn btn-primary">Save changes</a>
</div>
</div>
When your code runs, and your
response
is "Query successful" then, your modal structure becomes
<div class="modal hide fade" id="myModal">
Query successful
</div>
You should be specific on the part of the DOM you want to change, try
$('#myModal.modal-body').html(response);