jquery-ui-dialog

How to set jQuery UI dialog defaults

时光总嘲笑我的痴心妄想 提交于 2019-12-09 10:08:40
问题 How do I set the default values for the jQuery UI dialog? For example, this is how I set the defaults in the jQuery UI datepicker: $.datepicker.setDefaults({ dateFormat: 'dd/mm/yy' }); I couldn't find the same functionality in the dialog documentation 回答1: I found a solution $.extend($.ui.dialog.prototype.options, { modal: true, width: 650 }); 回答2: There's no built-in functionality for that AFAIK, but what I usually do is set them myself in a separate hash like this: var dialog_defaults = {

jQuery UI modal dialog captures all keypress so I can't input text inside it

冷暖自知 提交于 2019-12-09 07:53:33
问题 I create modal dialog with form inside it (with some text input). And I just can't enter the text inside the textbox. Dialog blocks keyboard input. Here is my simplified example: <div id="modal-dialog"> <label for="my-text">TRY to input text...</label> <textarea id="my-text" style="position:relative; z-index:1"></textarea> </div> <script type="text/javascript"> var dialog = $('#modal-dialog').dialog({ modal: true }); </script> Note : You may ask - why did I mentioned about "position:relative;

Print content of jquery dialog to a printer

旧街凉风 提交于 2019-12-08 12:20:40
问题 I have the following jQueryUI dialog. How can I print the content of the dialog? The content could be any HTML such as a table, image, etc. There were several earlier answers to this question,however, they appear to be out of date. <!doctype html> <html lang="en"> <head> <meta charset="utf-8" /> <title>jQuery UI Dialog</title> <script src="http://code.jquery.com/jquery-latest.js" type="text/javascript"></script> <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.1/themes/base/jquery

gmap shows one fourth after one load in jquery dialog box

半城伤御伤魂 提交于 2019-12-08 10:48:49
问题 I am trying to show gmap on the basis of longitude and latitude which are available in repeater control data source .here is my code <script src="http://maps.google.com/maps/api/js?key=myapikey&sensor=false" type="text/javascript"></script> <script type="text/javascript"> $('document').ready(function () { $('.mapicon').click(function (e) { init($(this).next('.hdnLatitude').val(), $(this).nextAll('.hdnLongitude').val(), $(this).nextAll('.hdnInfoWindow').val()); $("#popup_container").dialog({

jQuery UI modal dialog sliding behind dropdownlists in IE6

被刻印的时光 ゝ 提交于 2019-12-08 10:42:20
问题 I've just put the jQuery UI dialog into a web page. It's the first time I've used it. I thought I had set the bgiframe property correctly but when I check it in IE6 it's still slipping behind dropdownlists. Here's my javascript code. There's nothing flash on the page. A simple div with the text in and an anchor around some text for the 'jClick'. Any ideas why this is happening in IE6? $(document).ready(function(){ $("#dialog").dialog({ bgiframe: true, autoOpen: false, overlay: {

Trying to create a jQuery UI modal dialog without a close option

妖精的绣舞 提交于 2019-12-08 10:04:55
问题 I have a modal dialog that appears over a page that shouldn't be accessed but should still be seen from outside of the modal dialog. I have everything working perfectly except for two problems: As soon as the modal dialog appears, the link within it is automatically focused, so there is a blue box around it (just like with any element onto which I am focused), but I don't want this behavior. Also, there is an X button to allow the user to close the dialog, and I want to get rid of it. Any

How to persist jQuery UI dialog state between requests?

怎甘沉沦 提交于 2019-12-08 08:14:42
问题 I have an ASP.NET MVC web application. The application can be managed with a "remote control", which is a jQuery UI dialog and appears only when a user with sufficent permissions logs in and clicks on the "show remote control" button. (Obviously, the HTML code of the dialog is not there otherwise.) When the user clicks on a link on the site, this dialog closes itself. I want the dialog to "remember" that it was open and open itself automatically in such cases. What is the simplest and most

How to bind a WebGrid in a PartialView, which is in JQueryUI ModalPopup

五迷三道 提交于 2019-12-08 07:31:15
问题 I have this PartialView, which is loaded from the Layout of an MVC4 application. On a button click in the main navigation menu the method SearchCustomers is called in an ajax post (shown below). Everything seems to work. Fiddler shows Data is coming back as supposed however the grid is not visible in the Popup. I wonder what am I doing wrong? The Partial View @model Invoice.Web.ViewModels.SearchCustomerWindowVM <h2>Search Results</h2> <div id="resultsGrid"> @{ if (Model.CustomersList != null)

Creating multiple instances of dialog box

谁说我不能喝 提交于 2019-12-08 05:59:45
问题 I'm new to jQuery and java and I'm really trying to get my head round creating multiple instances of a dialog box. I'm using this in the head: <script src="external/jquery/jquery.js"></script> <script src="jquery-ui.js"></script> If I just have 1 button and and dialog box it works. But when I add another it stops working. I'm sure it will be quite easy to fix I'm just struggling. <h2>subjects</h2> <button id="opener">maths</button> <div id="dialog" title="Dialog Title">maths is an important

Detach and Attach div as a dialog in jquery

a 夏天 提交于 2019-12-08 05:30:30
问题 I have a div with some id that contains some buttons/labels. Its a container itself. I want to have a button that when user clicks on the button a dialog has to appear with the same div but the div has to disappear from the page. So when Detach button is clicked a dialog appears with that div and button changes into Attach. When attach is clicked dialog disappears and regular div appears on the page. This is what i tried so far, it works only when Detach is clicked, if Attach is clicked