jquery-ui-dialog

Simple jQueryUI Dialog causes error with 1.9

蹲街弑〆低调 提交于 2019-12-12 03:36:15
问题 I've previously used the following script and it worked perfectly. I am now getting the following error: Error: cannot call methods on dialog prior to initialization; attempted to call method 'close'. jquery-latest.js (line 507) If you upgrade to jQueryUI 1.10.1, it no longer causes an error. Normally, I would just let it go, upgrade, and not worry about it. Problem with this one is that it worked in the past so why not now is driving me crazy? I must be doing some silly thing different than

$(this).dialog is not a function

与世无争的帅哥 提交于 2019-12-12 02:29:40
问题 ...or Why $(this).dialog() fails in Firefox when using dynamic HTML? I have a a click event that opens a jQuery modal dialog box on a web page, and it is working fine in Chrome and IE, but not in Firefox. Here is the pertinent code: var dialogId = 'uniqueName-' + Math.floor(Math.random() * 1000) var dialogDiv = $(document.createElement('div')).attr("id", dialogId); dialogDiv.load(this.href, function () { var dialog = $(this).dialog({ autoOpen: false }); ... }); In Firefox 11, $(this).dialog({

Form validation is not working for dynamic dialog content

最后都变了- 提交于 2019-12-12 01:44:00
问题 In my application I am creating a dialog form using Jquery UI dialog. And this dialog form is dynamic. That is through ajax I am filling a div with some form data. Once this div is populated dynamically with a form then I am showing this form in a dialog box. Once this dialog box get opened then I need to do some form validation using Jquery validate() method before form is getting submitted. But the form is not validating. Div to populate form contents dynamically. <div id="popup" style=

jQuery UI 1.10 dialog - prevent insertBefore

眉间皱痕 提交于 2019-12-12 01:09:23
问题 With new jQuery UI, when opening two dialog windows and triggering focus - the dialog which gets focus will be inserted before other dialogs. I have made my own way of doing this with z-index , so I want to disable default one. I have set up http://jsfiddle.net/2C7yG/ for you to see my problem. Here when I have iframe inside dialog, after reinserting - iframe gets reconstructed. So it there any way to disable this behaviour? I also want to link this issue which I think describes the same Edit

Can a unique ID be added to a dialog box at run time?

人走茶凉 提交于 2019-12-11 23:16:20
问题 Is there a way to assign a unique value to a jQuery dialog box at run time so I can keep track of each dialog separately using the assigned ID? I am trying to interact with a telephony system where I would show a dialog box when there is an inbound call. The dialog box will have 3 buttons for the user to click on. Pick Up Send To Voice Mail Ignore if a user clicks on any of the three button an Ajax request is sent to the server and the dialog in closed on success. However, if a user gets

jQuery UI - Dialog Hide Effect in Firefox - Flickering

僤鯓⒐⒋嵵緔 提交于 2019-12-11 18:54:56
问题 I have a function that calls .dialog on a dynamically generated element. The code: dialog: function(message){ $('<div>').attr('innerHTML',message).dialog({ draggable: false, width: 500, hide: 'puff', resizable: false, bgiframe: true, modal: true, buttons: { Ok: function() { $(this).dialog('close'); } } }); }; (dialog is a function of an object named Global) When I close the dialog in IE, the effect works as expected. However, in Firefox the hide effect is all sorts of jagged and 'flicky'. I

jQuery UI autocomplete combobox in a modal dialog

北战南征 提交于 2019-12-11 13:51:22
问题 I want to use a autocomplete combobox http://jqueryui.com/demos/autocomplete/#combobox within a modal dialog. However whenever I click on the down arrow (of the combobox) it causes a refresh that results in my modal window closing. How do I stop the refresh from occuring? (I am still new to jQuery) I am using UI 1.8 and jQuery 1.4.1. 回答1: The problem is discussed on the jQuery forum here: http://forum.jquery.com/topic/autocomplete-combobox-problem-when-it-is-placed-inside-a-form-tag They

jQuery Dialog, closing when click outside

…衆ロ難τιáo~ 提交于 2019-12-11 12:48:12
问题 I know I can use the following to close the dialog box by clicking outside: $('.ui-widget-overlay').click(function() { $("#dialog").dialog("close"); }); But how do I change this so it works for every dialog box, ie I want to say close any dialog box as we have multiple on a page and would be easier to have one line of code? 回答1: you can give each dialog a class and then select it and run on each and cose it even if its not open it will work: $('.ui-widget-overlay').click(function() { $("

Prompt a warning message before closing a modal

一曲冷凌霜 提交于 2019-12-11 11:08:44
问题 I have a modal and i closing the dialog on clicking outside the modal dialog using backdrop property . I have a form in modal. If any changes are made in form and click outside the modal i should warn the user about unsaved changes. The code i am using $(window).on('hide.bs.modal', function() { var changed_data = $("#formid").serialize(); if(changed_data!=original_data) { var result = confirm("Are you sure ?"); if(result == true){ $('#dialog').data('bs.modal').options.backdrop = true; } else

Append jQuery UI dialog to its parent

可紊 提交于 2019-12-11 09:56:25
问题 I have the following html: <ul id="sortable"> <li class="ui-state-default">1 <div class="dialog-modal" title="Animal Facts" style="display:none;"> <p>What is the fastest animal on Earth?</p> </div> </li> <li class="ui-state-default">2 <div class="dialog-modal" title="Animal Facts" style="display:none;"> <p>What is the largest animal on Earth?</p> </div></li> ​ and the following jQuery code: $( ".dialog-modal" ).dialog({ autoOpen: false, height: 300, width: 350, modal: true }); $('.ui-state