jquery-ui-dialog

ASP.NET Mvc jquery ui dialog as view or partialview?

China☆狼群 提交于 2019-12-30 07:47:29
问题 I want to show view or partialview on dialog. There is an example in ASP.NET Mvc 4 default template (AjaxLogin.js). AjaxLogin.js catches if login is ajax. And runs jsonresult or actionresult. AjaxLogin control this with passing parameter to dialog. So passing parameter is important for me. Is there a problem with my use of this library for my specified forms. Or is there another js library about this topic? I m new about jquery ui. I m using AjaxLogin.js in my project now, for other forms.

Jquery dialog should only open once per user

喜夏-厌秋 提交于 2019-12-30 07:21:11
问题 I use jquery ui modal dialog on a front page and I'd like to show it only one per user. This is my code: <script> $(function() { $( "#dialog-message" ).dialog({ modal: true, resizable: false, show: 'slide', buttons: { Ok: function() { $( this ).dialog( "close" ); } } }); }); </script> <div id="dialog-message" title="Attention"> <p>Sample text here!</p> </div> Any help is much appreciated! Thanks! 回答1: Either use cookies (like mentioned before) or the localStorage API (depending on which

Jquery dialog should only open once per user

谁说我不能喝 提交于 2019-12-30 07:20:05
问题 I use jquery ui modal dialog on a front page and I'd like to show it only one per user. This is my code: <script> $(function() { $( "#dialog-message" ).dialog({ modal: true, resizable: false, show: 'slide', buttons: { Ok: function() { $( this ).dialog( "close" ); } } }); }); </script> <div id="dialog-message" title="Attention"> <p>Sample text here!</p> </div> Any help is much appreciated! Thanks! 回答1: Either use cookies (like mentioned before) or the localStorage API (depending on which

Backbone.js and JQueryUI Dialog - events not binding

独自空忆成欢 提交于 2019-12-30 05:27:25
问题 I'm trying to use Backbone.js to in a JQuery Dialog. I've managed to get the dialog to render and open, but it doesn't seem to be firing my events. I've added a test event to check this, and clicking it doesn't have the expected result. I've tried following the instructions on this blogpost, regarding delegateEvents, but nothing it made no difference. No errors are thrown, the events just don't fire. Why is this? Slx.Dialogs.NewBroadcastDialog.View = Backbone.View.extend({ events: { "click

Automatically resize jQuery UI dialog to the width of the content loaded by ajax

白昼怎懂夜的黑 提交于 2019-12-28 03:20:12
问题 I'm having a lot of trouble finding specific information and examples on this. I've got a number of jQuery UI dialogs in my application attached to divs that are loaded with .ajax() calls. They all use the same setup call: $(".mydialog").dialog({ autoOpen: false, resizable: false, modal: true }); I just want to have the dialog resize to the width of the content that gets loaded. Right now, the width just stays at 300px (the default) and I get a horizontal scrollbar. As far as I can tell,

integrating jquery ui dialog with knockoutjs

戏子无情 提交于 2019-12-27 11:43:32
问题 I am trying to create knockoutjs bindings for jquery ui dialogs, and cannot get the dialog to open. The dialog element is created correctly, but seems to have display: none that calling dialog('open') doesn't remove. Also, the call to dialog('isOpen') returns the dialog object rather than a boolean. I am using the latest knockoutjs and jquery 1.4.4 with jquery ui 1.8.7. I've also tried it with jQuery 1.7.1 with the same results. Here's my HTML: <h1 class="header" data-bind="text: label"></h1>

jquery-ui-dialog - How to hook into dialog close event

孤街浪徒 提交于 2019-12-27 11:39:55
问题 I am using the jquery-ui-dialog plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked but that doesn't cover the user closing with escape or the x in the top right corner. 回答1: I have found it! You can catch the close event using the following code: $('div#popup_content').on('dialogclose', function(event) { alert('closed'); });

integrating jquery ui dialog with knockoutjs

孤者浪人 提交于 2019-12-27 11:39:33
问题 I am trying to create knockoutjs bindings for jquery ui dialogs, and cannot get the dialog to open. The dialog element is created correctly, but seems to have display: none that calling dialog('open') doesn't remove. Also, the call to dialog('isOpen') returns the dialog object rather than a boolean. I am using the latest knockoutjs and jquery 1.4.4 with jquery ui 1.8.7. I've also tried it with jQuery 1.7.1 with the same results. Here's my HTML: <h1 class="header" data-bind="text: label"></h1>

jquery-ui-dialog - How to hook into dialog close event

假装没事ソ 提交于 2019-12-27 11:39:11
问题 I am using the jquery-ui-dialog plugin I am looking for way to refresh the page when in some circumstances when the dialog is closed. Is there a way to capture a close event from the dialog? I know I can run code when the close button is clicked but that doesn't cover the user closing with escape or the x in the top right corner. 回答1: I have found it! You can catch the close event using the following code: $('div#popup_content').on('dialogclose', function(event) { alert('closed'); });

load jquery modal dialog after a delay

六眼飞鱼酱① 提交于 2019-12-25 11:33:48
问题 I would like to load jquery dialog after a delay of few seconds after page load. Here is my code so far. <div id="dialog" title="My Dialog Title" style="display:none"> <p>This is My Dialog box Description/Content</p> <script type="text/javascript"> $(document).ready(function() { setTimeout(function(){ $(function () { $("#dialog").dialog({ show: { effect: 'drop', direction : 'up', distance: 1000, duration: 2000, }, }); }); }, 2000) }); </script> <style> .ui-dialog-titlebar {display:none;}