jquery-ui-dialog

JQueryUI Dialog Size

那年仲夏 提交于 2019-12-22 01:24:17
问题 I'm new to JQueryUI, and though I have a dialog working, it doesn't open at the size I think I'm specifying. Why does setting the width and height when the dialog is defined not affect the initial size of the dialog? How do I make it 600px by 500 px? Here is the div that defines the dialog: <div id="dialog-form" title="Create Appointment"> <form> . . . </form> </div> Here is the JavaScript that makes a dialog of it: $(function() { $("#dialog-form").dialog({ autoOpen: false, maxWidth:600,

Extending widgets in Jquery UI with redefining parent methods

偶尔善良 提交于 2019-12-22 01:14:40
问题 I try to extend UI dialog according to documentation (UI version 1.8.16): (function($) { $.widget('ui.mydialog', $.extend(true, $.ui.dialog.prototype, { _create: function() { return $.Widget.prototype._create.apply(this, arguments); } })); })(jQuery); $(function() { $('div#dialog').mydialog(); }); Executing of this code causes JS error: "this.uiDialog is undefined". And if try to override the _init() method there are no errors, but parent method call takes no effect. I'm confused.. Which way

How do I open a jQuery UI Dialog from my c# code behind?

好久不见. 提交于 2019-12-21 20:42:35
问题 I am trying to open a jQuery UI Dialog from my ASP.NET c# Code Behind. I have created the code below, but I can't get it to work, and am unsure how to debug the problem. How can I resolve this issue? My JavaScript: <script> $(function () { $("#dialog_info").dialog("destroy"); $("#dialog_info").dialog({ autoOpen: false, modal: true, buttons: { Ok: function () { $(this).dialog("close"); } } }); }); function show() { $("#dialog_info").dialog("open"); return false; } </script> My HTML: <body>

In IE8, jquery-ui's dialog set the height of its contents to zero. How can I fix this?

空扰寡人 提交于 2019-12-21 09:36:54
问题 I am using jquery UI's dialog widget to render a modal dialog in my web application. I do this by passing the ID of the desired DOM element into the following function: var setupDialog = function (eltId) { $("#" + eltId).dialog({ autoOpen: false, width: 610, minWidth: 610, height: 450, minHeight: 200, modal: true, resizable: false, draggable: false, }); }; Everything works just fine in Firefox, Safari, and Chrome. However, in IE 8 when the dialog is opened only the div.ui-dialog-titlebar is

Using jquery-ui dialog as a confirm dialog with an ASP:LinkButton (how to invoke the postbck)

自作多情 提交于 2019-12-21 02:56:18
问题 I'd like to use jQuery UI's dialog to implement a confirm dialog which is shown when the user clicks a delete-link (implemented using an asp:LinkButton ). I'm using code as shown below (copied from the jquery ui documentation): <!-- the delete link --> <asp:LinkButton ID="btnDelete" runat="server" Text="Delete" OnClick="btnDelete_Click" CssClass="btnDelete"></asp:LinkButton> <!-- the confirm-dialog --> <div id="dialog-confirm-delete" title="Delete?" style="display:none;"> <p>Are you sure you

How do I get Bootstrap Tour to work with a jQuery dialog?

假装没事ソ 提交于 2019-12-21 02:48:07
问题 Basically I can get Bootstrap Tour working with the most basic example, but when targeting an element in a jQuery dialog the highlight covers up the element. var t = new Tour({ backdrop: true }); t.addStep({ element: "#content", title: "Title", content: "Content" }); t.start(); Here is a jsFiddle example of what I mean. The highlight element should be behind the targeted element so that the text is still visible. I think the issue is the z-index of the elements. It should be dialog ->

jQuery dialog with dynamic content

青春壹個敷衍的年華 提交于 2019-12-20 10:25:09
问题 I want to create a jQuery dialog on-the-fly. I'm using this: var newDiv = $(document.createElement('div')); $(newDiv).html('hello there'); $(newDiv).dialog(); I then have this in the html header: <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script> <script type="text/javascript" src="js/jquery-ui-1.8.1.custom.min.js"></script> When I try running the JS in IE7 I get the following error on the $(newDiv).dialog(); line : Object doesn't support this property or method. Anyone

Populate jquery modal dialog with MVC partial view async, and show in center of screen

江枫思渺然 提交于 2019-12-20 09:49:19
问题 I'm trying to use the jquery modal dialog to show a partial view async when clicking on something. Pretty simple, and there are loads of questions on this, but I can't seem to get it work. I have had the modal displaying, but not in the center. And I've read it's because I'm populating the div after the dialog is displayed, therefore the position is relative to the empty div, not the populated one - and I've proved this to be the case by showing some static content, and it centers fine. So

JQuery UI Dialog slow

爱⌒轻易说出口 提交于 2019-12-19 15:14:03
问题 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

How to combine two javascript FormData objects

橙三吉。 提交于 2019-12-19 05:52:16
问题 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? 回答1: You cannot. FormData is unfortunately not