jquery-ui-dialog

How to close all jquery ui dialog before open a new dialog?

孤人 提交于 2019-12-07 07:20:58
问题 I want to close all jquery dialogs before open a new dialog. I'm trying with following code. $(".ui-dialog-content").dialog("close"); It works but it too close new dialog too. please help me anyone. 回答1: Try: $(".ui-dialog-content").not(<selector for the dialog you don't want to close>).dialog("close"); 回答2: Just ran into this myself. I solved it like this. .dialog is a class that all the elements I made into dialogs share. $(".ui-dialog:visible").find(".dialog").dialog("close"); 回答3: How are

jQuery UI Dialog behaves unpredictably

China☆狼群 提交于 2019-12-07 05:22:30
问题 The jQuery UI dialog drives me up the walls. To the best of my understanding, here's how it works: When you do $('#myDialog').dialog({...}) , it copies the #myDialog element and moves it inside this bizarre widget thing at the bottom of your body tag. This is crazy! It will duplicate possibly unique DOM elements (with ids) when it does this. So what I'm trying to do is make it behave in a predictable way when I refresh the HTML of the original element (#myDialog). If I do this dynamically,

Cannot set focus to a form field in a jQuery UI dialog on clicking a jQueryUI menu item

北战南征 提交于 2019-12-07 05:02:37
问题 I've got a jQuery UI dialog containing a one-field form and the autoOpen property is set to false at the beginning. There's another jQuery UI menu on the page and the dialog's open function is binding to the click event of the menu items. I've been trying to set focus to the only form field of the dialog when the dialog is open on click of the menu items somehow no luck. To pinpoint the cause I also added another test button and by clicking that button I can set focus to the form field. So I

server side validation in jquery dialog

五迷三道 提交于 2019-12-07 01:50:42
问题 sorry for my language - in English i can only read :) i want to do in asp.net mvc something like this: 1. show user a page 2. open modal dialog (jquery-ui) and show partial view 3. validate user input data on client side 4. if it's OK then validate input data on server 5a. if it's OK then i want reload page 5b. if there is a errors i want show its to user 6. user can close dialog at any time with button on it. i have problem width 5a and 6. in Firefox when i do server validate and click close

TinyMCE opened in jqueryUI modal dialog

家住魔仙堡 提交于 2019-12-07 01:03:14
问题 When using tinyMCE in a jqueryUI modal dialog, I can't use the hyperlink or 'insert image' features. Basically, after lots of searching, I've found this: http://www.tinymce.com/develop/bugtracker_view.php?id=5917 The weird thing is that to me it seams less of a tinyMCE issue and more of a jqueryUI issue since the problem is not present when jqueryUI's modal property is set to false. With a richer form I saw that what happens is that whenever the tinyMCE loses focus, the first element in the

Whitescreen issue in IE9 - Removing iframe

与世无争的帅哥 提交于 2019-12-07 00:06:00
问题 I"m wondering if anyone can give me some insight into a really strange IE9 issue I've been struggling with. I'm finishing up production of a site for work - it works well in ff/chrome/ie7/ie8 with no script errors. On IE9 the last step of the application causes the entire tab to whitescreen with no script errors or warnings. (changing the document mode to ie8 will fix the problem but is obviously unsuitable for production) Unfortunately the site pretty complex with a ton of ajax, and in-page

Close all open dialog boxes? (JQuery)

馋奶兔 提交于 2019-12-06 17:21:34
问题 How can I close all opened dialog boxes in jQuery ? The situation is next: I have a simple page without dialogs. It has some buttons what open it owns dialogs. When I click on a button I need to close all opened dialogs. Here is the HTML: <div id="buttons"> <a href="#" id="btn_1">Button 1</a> <a href="#" id="btn_2">Button 2</a> <a href="#" id="btn_3">Button 3</a> </div> <div id="dialog_1" class="dialogbox">...</div> <div id="dialog_2" class="dialogbox">...</div> <div id="dialog_3" class=

Why is my animated GIF not animated when I call an AJAX method?

我的梦境 提交于 2019-12-06 10:17:57
Using the code below, I can get the dialog to display properly while the AJAX data loads, but the animated GIF is not animated - looks really crappy. CSS: .loading { background: url('/images/loading.gif'); } JavaScript: $(function() { $("#createButton").click(function(e){ e.preventDefault(); var $form = $(this).closest("form"); $("#pleaseWait-dialog").dialog({ modal: true, height: 200, resizable: false, draggable: false }); $.ajax({ type: "GET", url: "myScript.cfm", async: true, success: function() { $form.submit(); } }); return false; }); }); HTML: <form action="post.cfm" method="post">

jQuery UI overlay without dialog [duplicate]

放肆的年华 提交于 2019-12-06 09:13:38
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: jQuery UI: How to use ui-widget-overlay by itself? I want to avoid the user to change the screen during ajax calls. So I was thinking to use jQuery UI overlay (the overlay of the modal dialogs) but without any dialog. I couldn't find any way to do this. Is there any way to show a modal without a dialog? 回答1: I take this answer of another SO question. Here there is a fiddle. And the code: $("body").append($.ui

why does jquery ui dialog break asp.net mvc's default model binding .

落花浮王杯 提交于 2019-12-06 08:03:14
问题 i just took the demo jquery UI dialog (model dialog) sample and tried to include it in my asp.net mvc project and i have observed something weird. If you have content inside a jquery ui dialog div tag, the default model binder doesn't pick it up during posting to the server as it if removed these elements from the form the full view code is below. if you see at the bottom, there is the section where the content of the dialog: <div id="dialog" The issue is that in my table inside the "div