jquery-ui-dialog

How to combine two javascript FormData objects

醉酒当歌 提交于 2019-12-01 16:17:19
I need to combine two FormData objects and post them using XMLHttpRequest. One of the forms contains file input. var formData = new FormData(document.forms.namedItem('form-ship')); var poData = new FormData(document.forms.namedItem('po-form')); // Combine them var fData = $.extend(true, formData, poData); It doesn't work when I use $.extend or if I use serialize() to combine the form that doesn't have file input. Any idea how to do this? You cannot. FormData is unfortunately not enumerable. However, as you say only one of your forms does contain a file input. Then it should be possible to use

JQuery UI Dialog slow

北慕城南 提交于 2019-12-01 16:00:37
I've recently ran into a bit of a pain. I've been using the JQuery Dialog box to display some configuration screens in a web app. Nothing too special. However I have a couple edge cases where this config form will display a drop down of some... 11000 options. [DODGES ROTTEN TOMATOES] Needless to say, it's slow. It can take up to 9 seconds for the JQuery Dialog to show (and the init is slow as well). First question is: Is there a way to speed up the Dialog boxes? From what it seems, it copies all the content each time it opens. If there was a way to avoid that, it would help a bit. Second

jQuery UI dialog - problem with event on close

天涯浪子 提交于 2019-12-01 13:00:44
I'm trying to perform a specific action when I close a jQuery UI dialog. Here's a simplified version of my code: $('a.open-trigger').click(function(){ var test = 'hello'; $('#dialog').dialog({ bgiframe: true, dialogClass: 'change', resizable: false, draggable: false, modal: true, height: 334, width: 450, autoOpen: false, show: 'fade' }); $('#dialog').dialog('open'); $('a.close-trigger').click(function(){ alert(test); $('#dialog').dialog('close'); }); }); The first time I close the dialog, I get the expected alert with the word "hello". If I open the dialog a second time, and close it, I get

Force JQuery Dialog Title to Multiple Lines

泪湿孤枕 提交于 2019-12-01 11:58:30
How can I force a jQuery Dialog's Title to always be two lines? See this: http://jsfiddle.net/VKcJ7/24/ I know the dialog title is contained in a span, so I'm not sure if this is possible. I want the 'SOME ITEM' portion to always be on the first line, and the 'Remaining qty...' portion to always be on the second line. JS: $(document).ready(function () { $('#dialog').dialog({ autoOpen: false, modal: true, title: 'SOME ITEM \n Remaining Qty (Cts.): 0' //adding the newline character \n is ignored... }); }); CSS: .ui-dialog .ui-dialog-title { white-space:normal; } James I ended up using the answer

jQuery UI dialog - problem with event on close

本小妞迷上赌 提交于 2019-12-01 11:52:33
问题 I'm trying to perform a specific action when I close a jQuery UI dialog. Here's a simplified version of my code: $('a.open-trigger').click(function(){ var test = 'hello'; $('#dialog').dialog({ bgiframe: true, dialogClass: 'change', resizable: false, draggable: false, modal: true, height: 334, width: 450, autoOpen: false, show: 'fade' }); $('#dialog').dialog('open'); $('a.close-trigger').click(function(){ alert(test); $('#dialog').dialog('close'); }); }); The first time I close the dialog, I

Force JQuery Dialog Title to Multiple Lines

我是研究僧i 提交于 2019-12-01 10:52:20
问题 How can I force a jQuery Dialog's Title to always be two lines? See this: http://jsfiddle.net/VKcJ7/24/ I know the dialog title is contained in a span, so I'm not sure if this is possible. I want the 'SOME ITEM' portion to always be on the first line, and the 'Remaining qty...' portion to always be on the second line. JS: $(document).ready(function () { $('#dialog').dialog({ autoOpen: false, modal: true, title: 'SOME ITEM \n Remaining Qty (Cts.): 0' //adding the newline character \n is

How to properly attach event to “close dialog” for “columns chooser” of jqGrid?

无人久伴 提交于 2019-12-01 09:17:41
I'm having some trouble properly using the close dialog event for the columns chooser plugin/widget of jqGrid. Here's what I have - I start with the jqGrid initialization with the column chooser attached at the end, like so ticketsTable = tableWrap.jqGrid({ url: ... , datatype: ... , ... loadComplete: function(d) { ... } }) .navGrid('#ticketsList_footer', {edit:false, add:false, del:false, cloneToTop:true}) .navButtonAdd('#ticketsList_toppager', { caption: "Columns", title: "Reorder Columns", id: "colButton", onClickButton: function(){ ticketsTable.jqGrid('columnChooser'); } }); Then, in the

show/hide jQuery dialog box on mouseover

我是研究僧i 提交于 2019-12-01 08:58:27
I'm trying to make a mouseover map area on an image that must display a dialog box when the mouse is over. The dialog box content is different, depending on which area it is. My script actually always show all the dialog boxes. Here is the jsFiddle I created : http://jsfiddle.net/U6JGn/4/ and the javascript : $(function() { $('#box').dialog( { modal:true, resizable:false } ).parent().find('.ui-dialog-titlebar-close').hide(); for (var i = 0; i < 2; i++) { $( "#elem"+i ).mouseover(function() { $( ".box"+i ).dialog( "open" ); }); $( "#elem"+i ).mouseout(function() { $( ".box"+i ).dialog( "close"

show/hide jQuery dialog box on mouseover

 ̄綄美尐妖づ 提交于 2019-12-01 07:24:38
问题 I'm trying to make a mouseover map area on an image that must display a dialog box when the mouse is over. The dialog box content is different, depending on which area it is. My script actually always show all the dialog boxes. Here is the jsFiddle I created : http://jsfiddle.net/U6JGn/4/ and the javascript : $(function() { $('#box').dialog( { modal:true, resizable:false } ).parent().find('.ui-dialog-titlebar-close').hide(); for (var i = 0; i < 2; i++) { $( "#elem"+i ).mouseover(function() {

$(“#dialog”).parent().appendTo($(“form:first”));

随声附和 提交于 2019-12-01 04:43:53
I'm opening a few jQuery dialogs on my page and I was using: $("#dialog2").parent().appendTo($("form:first")); //This was working, no problem. I noticed when I applied it again to dialog3 it has stopped that line from working on dialog 2. How can this be used for different dialogs? $("#dialog2").dialog({ bgiframe: false, autoOpen: false, height: 410, width: 800, modal: true, draggable: true, resizable: true }); $("#dialog2").parent().appendTo($("form:first")); //doesn't work now $("#dialog3").dialog({ bgiframe: false, autoOpen: false, height: 410, width: 600, modal: true, draggable: true,