Questions tagged [jquery-ui-dialog]

The Dialog widget that forms part of the jQuery.UI library

The Dialog widget is part of the library.

It can open a dialog windows, which is a floating window that contains a title bar and a content area. The dialog window can be moved, resized and closed with the 'x' icon by default.

API Documentation


Related Tags

2226 questions
808
votes
25 answers

How to remove close button on the jQuery UI dialog?

How do I remove the close button (the X in the top-right corner) on a dialog box created by jQuery UI?
Robert MacLean
  • 38,975
  • 25
  • 98
  • 152
208
votes
18 answers

jQuery UI Dialog - missing close icon

I'm using a custom jQuery 1.10.3 theme. I downloaded every straight from the theme roller and I have intentionally not changed anything. I created a dialog box and I get an empty gray square where the close icon should be: I compared the code that…
Xion Dark
  • 3,374
  • 2
  • 15
  • 23
192
votes
10 answers

jquery-ui-dialog - How to hook into dialog close event

I am using the jquery-ui-dialog plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked but…
Brownie
  • 7,688
  • 5
  • 27
  • 39
145
votes
14 answers

How can I disable a button on a jQuery UI dialog?

How do I go about disabling a button on the jQuery UI dialog. I can't seem to find this in any of the documentation in the link above. I have 2 buttons on the modal confirmation ("Confirm" and "Cancel"). In certain cases, I want to disable the…
leora
  • 188,729
  • 360
  • 878
  • 1,366
139
votes
7 answers

How to completely remove a dialog on close

When an ajax operation fails, I create a new div with the errors and then show it as a dialog. When the dialog is closed I would like to completely destroy and remove the div again. How can I do this? My code looks something like this at the…
Svish
  • 152,914
  • 173
  • 462
  • 620
137
votes
14 answers

Automatically resize jQuery UI dialog to the width of the content loaded by ajax

I'm having a lot of trouble finding specific information and examples on this. I've got a number of jQuery UI dialogs in my application attached to divs that are loaded with .ajax() calls. They all use the same setup call: …
womp
  • 115,835
  • 26
  • 236
  • 269
134
votes
7 answers

Make JQuery UI Dialog automatically grow or shrink to fit its contents

I have a JQuery UI dialog popup that displays a form. By selecting certain options on the form new options will appear in the form causing it to grow taller. This can lead to a scenario where the main page has a scrollbar and the JQuery UI dialog…
MikeN
  • 45,039
  • 49
  • 151
  • 227
122
votes
21 answers

jQuery UI - Close Dialog When Clicked Outside

I have a jQuery UI Dialog that gets displayed when specific elements are clicked. I would like to close the dialog if a click occurs anywhere other than on those triggering elements or the dialog itself. Here's the code for opening the…
Sonny
  • 8,204
  • 7
  • 63
  • 134
115
votes
11 answers

jquery ui Dialog: cannot call methods on dialog prior to initialization

I have an app on jquery 1.5 with dialogs worked fine. While I have a lot of .live handlers, I changed this to .on. For that, I have to update jquery (now 1.8.3 an jquerui 1.9.1). Now, I got: Error: cannot call methods on dialog prior to…
Oliver Lienhard
  • 1,253
  • 2
  • 8
  • 4
100
votes
5 answers

Detect if a jQuery UI dialog box is open

I am using a jQuery UI dialog. If it is open, I want to do one thing. If it is closed, I want to do another. My question is, how do I detect if a jQuery UI dialog box is open or not?
user208662
  • 10,869
  • 26
  • 73
  • 86
83
votes
11 answers

Passing data to a jQuery UI Dialog

I'm developing an ASP.Net MVC site and on it I list some bookings from a database query in a table with an ActionLink to cancel the booking on a specific row with a certain BookingId like this: My bookings …
Frederik
  • 2,178
  • 4
  • 20
  • 20
79
votes
12 answers

jQuery UI Dialog Box - does not open after being closed

I have a problem with the jquery-ui dialog box. The problem is that when I close the dialog box and then I click on the link that triggers it, it does not pop-up again unless I refresh the page. How can I call the dialog box back without…
David Bonnici
  • 6,677
  • 12
  • 54
  • 72
77
votes
2 answers

How to update 'title in jQuery UI Dialog?

Possible Duplicate: jQuery ui dialog change title after load-callback I like to change the title from an UI Dialog after I have submitted a form in this UI Dialog. So in the callback-function after load I should suggest, but I've tried and…
Guido Lemmens 2
  • 2,317
  • 5
  • 23
  • 29
72
votes
7 answers

Error: TypeError: $(...).dialog is not a function

I am having an issue getting a dialog to work as basic functionality. Here is my jQuery source imports: