We are using Bootstrap Modal window
to display some html that is loaded via a remote source. We\'re doing this via the recommended way in the Bootstrap>
For Bootstrap v3.3.7 , here is the solution I came up with based on Mark Fox's answer . Just find the " .load " section in your bootstrap js file, and make it look like this :
if (this.options.remote) {
this.$element
.find('.modal-content')
.load(this.options.remote, $.proxy(function (response, status, xhr) {
if (status == 'error') {
this.$element.find('.modal-content').html('Error
'+response);
}
this.$element.trigger('loaded.bs.modal');
}, this))
}
Substitute your own error message of course or whatever other code you need.