jquery-ui-dialog

Opening JQuery Ui Dialog in MousePosition

这一生的挚爱 提交于 2019-11-29 13:31:29
问题 i want to open JQuery UI Dialog In Mouse Position. what is the problem with my code? <script type="text/javascript"> $(document).ready(function () { var x; var y; $(document).mousemove(function (e) { x = e.pageX; y = e.pageY; }); $("#d").dialog({ autoOpen: false, show: "blind", hide: "explode", position: [x, y] }); $("#c").bind("mouseover", function () { $("#d").dialog('open'); // open }); $("#c").bind("mouseleave", function () { $("#d").dialog('close'); // open }); }); </script> 回答1:

Incorrect Z-Order - the jqgrid Add/Edit screen shows up behind if you the grid is on a jquery ui dialog

不羁的心 提交于 2019-11-29 12:55:12
i have a jquery ui dialog and i have a jqgrid on that dialog. When i click Add or Edit, the jqgrid popup (to have a popup on a popup), it shows up to enter in the data BUT . . . .it shows up behind the jquery UI dialog (the zorder is wrong). Is there anyway to have the jqgrid popup set the correct Zorder so this window shows on top of (in front of) the jquery ui dialog so this is usable. I have a screenshot below highlighting the behavior. here is my code: $(document).ready(function () { $("#modalDialogContainer").dialog({ resizable: false, height: 'auto', autoOpen: false, width: 1000, modal:

Mimicking a confirm() using jqueryUI Dialog

依然范特西╮ 提交于 2019-11-29 11:30:27
I would like to mimic a standard JavaScript confirm() using a jQueryUI dialog. I was thinking of something like the following, but I am obviously not understanding how it should work. Any suggestions? Thank you return $("#dialog-cancel").dialog("open"); $("#dialog-cancel").dialog({ autoOpen: false,height: 400,width: 350,modal: true, open: function(event, ui){}, buttons: {'OK': function(){$(this).dialog("close");return true;},'CANCEL': function() {$(this).dialog("close");return false;}} }); Didier Ghys The duplicate is not really useful indeed. I'm sorry for that. Based on this answer , this

JQuery Clear Form on close

只愿长相守 提交于 2019-11-29 07:40:57
I have the below JQuery Dialog script, I'm trying to find out how to fire off a function that clears the form when I close the dialog. function clearForm() { $(':input','#calcQuery') .not(':button, :submit, :reset, :hidden') .val(''); }; // form popup $(document).ready(function() { //var dataString = $("#calcQuery").serialize(); $("#formBox").dialog({ bgiframe: true, autoOpen: false, height: 600, width: 400, modal: false, closeOnEscape: true, title: "Calculator", buttons: { "Calculate": function() { // form post $.ajax({ type: "POST", url: "calc.php", data: $("#calcQuery").serialize(),

jQuery - remove user input text from textarea

∥☆過路亽.° 提交于 2019-11-29 06:11:35
问题 Okay I have a list of devices where i can select which to edit. I have 3 states for the edit. When no devices are selected, when 1 device is selected or when x devices are selected. The problem i have is when a user type some text in the textarea (commentField) and cancels the edit to edit another device, the text there was typed in the textarea won't disapere. It stays so when i get the new dialog for the new edit, the commentfield has the text from the old commentField (as if it wasn't

extend jquery ui dialog (add more options)

。_饼干妹妹 提交于 2019-11-29 05:15:38
how I can create and add new options for jQuery dialog? for example: I like that through on the setting options can control the display of title bar or display the close button. The script would be like this: $("#message").dialog({ showTitle:false, //new option (hide Title bar) showCloseButton:true //new option (show close button) modal:true... //other options }) It's a little easier than I expressed in my comment. // store old method for later use var oldcr = $.ui.dialog.prototype._create; // add the two new options with default values $.ui.dialog.prototype.options.showTitlebar = true; $.ui

jquery: if ul is empty

喜夏-厌秋 提交于 2019-11-29 03:06:27
Okay I have a jQuery dialog box which has a form in it and I am at my wits end trying to figure this out... Lets see if I can verbalize what I am trying to do.. I have 3 text boxes. #apInterest , #apPayment and #apPrincipal in that exact order. basic english terms of what i am trying to do: on keyup in #apInterest if .val is less than 0 or greater than 99.99 trigger an error.. else check ul#mylist if it has any li , if not .hide on keyup in #apPayment if .val is less than 0 trigger an error else check the list for li hide if not. #apPrincipal is the same thing exactly as #apPayment what I have

MVC Knockout JS inside JQuery dialog

本小妞迷上赌 提交于 2019-11-29 02:32:48
I am using knockout js on a view to display a list of fields (ie, first name, last name, etc). The fields are listed inside a knockout template using the an observable array. The template contains the following fields: name (input), translation (select), and an add/remove function. (See below) var viewModel = { Fields: ko.observableArray([new Field(2, "First Name", 1), new Field(3, "Last Name", 2)]), AvailableTranslations: ko.observableArray([new Translation(1, "Prefixes"), new Translation(2, "Suffixes")]), remove: function(item) { ko.utils.arrayRemoveItem(this.Fields, item) }, add: function()

jQuery UI dialog - check if exists by instance method

寵の児 提交于 2019-11-29 01:24:39
问题 I'd like to use instance method for testing if jQuery UI Dialog widget has been initialized or not. Regarding to API, this is possible, but it doesn't work for me: Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'instance' demo: http://jsfiddle.net/mDbV7/ UPDATE: This was a mistake in the documentation, instance method will be available from version 1.11.0, see this issue. 回答1: The latest version of jQuery UI no longer allows you to call UI

In jquery UI dialog, is it possible to put a modal dialog on top of another modal dialog

若如初见. 提交于 2019-11-29 01:18:30
问题 I have a modal dialog using jquery UI dialog. I now want to popup another dialog when i user changes a field in the first dialog. Both should be modal. Is this possible as i tried putting this code there and nothing seems to popup. The following code works fine when click from a regular page (where the select control with id: selectDropdownThatICanChange) but if the same select control that i am changing is itself a dialog the dialog("Open") line does nothing. The change event fires and the