Close dialog on click (anywhere)

Edit: Here’s a plugin I authored that extends the jQuery UI Dialog to include closing when clicking outside plus other features: https://github.com/jasonday/jQuery-UI-Dialog-extended Here are 3 methods to close a jquery UI dialog when clicking outside popin: If the dialog is modal/has background overlay: http://jsfiddle.net/jasonday/6FGqN/ jQuery(document).ready(function() { jQuery(“#dialog”).dialog({ bgiframe: true, autoOpen: false, height: 100, modal: true, … Read more

Disable click outside of angular material dialog area to close the dialog (With Angular Version 4.0+)

There are two ways to do it. In the method that opens the dialog, pass in the following configuration option disableClose as the second parameter in MatDialog#open() and set it to true: export class AppComponent { constructor(private dialog: MatDialog){} openDialog() { this.dialog.open(DialogComponent, { disableClose: true }); } } Alternatively, do it in the dialog component … Read more

How to get IE9 standards support for dialogs opened by HTA?

A quick Google of the keywords in this question gave me this page on Microsoft MSDN site: http://msdn.microsoft.com/en-us/subscriptions/ms536496(v=vs.85).aspx The answer to your question is on tha page. The answer is to add an x-ua-compatible meta tag to your HTML’s <head> section. To quote: By default, HTAs display webpages in Compatibility View, which displays standards-mode content … Read more

How to have jQueryUI dialog box dynamically load content

This isn’t hard to do — I wouldn’t start messing with iframes for this alone. How about something like this? $( “.selector” ).dialog({ open: function(event, ui) { $(‘#divInDialog’).load(‘test.html’, function() { alert(‘Load was performed.’); }); } }); Basically, you create your dialog, and when it is opened, an html file is loaded from your server, replacing … Read more

Load content with ajax in bootstrap modal

The top voted answer is deprecated in Bootstrap 3.3 and will be removed in v4. Try this instead: JavaScript: // Fill modal with content from link href $(“#myModal”).on(“show.bs.modal”, function(e) { var link = $(e.relatedTarget); $(this).find(“.modal-body”).load(link.attr(“href”)); }); Html (Based on the official example. Note that for Bootstrap 3.* we set data-remote=”false” to disable the deprecated Bootstrap … Read more