jquery-ui-dialog

Validate JQuery UI modal form within another form in MVC 4

寵の児 提交于 2019-12-03 08:57:35
I have a form in MVC 4 which contains several fields and, depending on the value of a combo, I need to open a modal dialog form and load into that one 3 additional fields that will impact against the same entity that I'm creating/editing in the main form. For this modal dialog I'm using the one from jQuery UI. Now, what I need to do is to validate (Required) the fields within the modal dialog in order to allow the user to retain the entered values which will be submited later by the main form. My problem is how to perform the validation of those 3 fields from within the modal form (because

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

﹥>﹥吖頭↗ 提交于 2019-12-03 08:46:17
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 -> highlight -> element, but instead it looks like it's dialog -> element -> highlight. The z-index of the dialog

jQuery UI Dialog with Form Validation Plugin

痴心易碎 提交于 2019-12-03 07:46:48
I am currently using the bassistance validation plugin for my forms. And I am using a pop-up modal dialog box to house a form that needs to be validated, but for some reason it isn't calling my form... all of my ID's and references are working and I still don't any success. Perhaps someone can shed some light for me. Here is my Javascript code. $("#addEventDialog").dialog("open"); $("#addEventDialog").dialog({ title: 'Add Event', modal: true, buttons: { "Save": function() { $("#interestForm").validate({ submitHandler: function(form) { $("#calendarWidget2").ajaxSubmit({ target: "

How to remove jQuery-ui dialog title bar?

血红的双手。 提交于 2019-12-03 07:21:04
问题 I am trying to hide jQuery-ui dialog's title bar but keep the close button in the title bar visible. I have searched lots of post on stackoverflow like this one. In each post the title bar is hidden but the space taken by the bar is still there. I want to remove that space also but without removing the close button. How can i do this? 回答1: Based on this answer: Use .dialog("widget") option to locate the div wrapper for the dialog. The wrapper contains all the markup used for the dialog

How do I close a dialog using jQuery?

五迷三道 提交于 2019-12-03 06:47:48
问题 I am using the code below to create a jQuery UI Dialog widget dynamically: $(function () { var Selector = $("a:contains('sometext')"); $(Selector).bind('click', function () { var NewDialog = "<div dir=rtl id='MenuDialog'></div>"; var DialogContetn = '<div dir=rtl ><table width=100%><tr><td><textarea id="txtRequestContent" cols="30" rows="2"></textarea></td><td><table><tr><td><input id="btnSendEditionRequest" type="button" value="Send" /></td></tr><tr><td><input id="btnCloseDialog" type=

iFrame in jQuery UI dialog causes horizontal scrollbar on parent

橙三吉。 提交于 2019-12-03 05:11:54
I'm using the jQuery UI dialog to present content in a new iFrame. Everything works out great except that the parent window of the dialog is getting a horizontal scrollbar while the dialog is displayed (IE8). I've tracked down the problem to the <html> element within the iFrame being interpreted as very wide by the browser, even though the only content on the page in the iFrame in a 580px div. I've tried adding CSS to the HTML and BODY tags within the iFrame (e.g. width: 98% or width: 600px;)... none of which seems to have any impact. The code for opening the dialog is below. Any suggestions?

with jquery UI dialog, is there anyway to have a max height and use 'auto' if its smaller

回眸只為那壹抹淺笑 提交于 2019-12-03 04:35:33
I want a dialog to have a max height setting but, if the content is smaller, then to shrink down to do what height = 'auto' does. Is this possible in JQuery UI dialog? You can achieve this by doing the following: HTML <div id="dialog" title="Dialog Title"> Dialog content </div> JavaScript $('#dialog').dialog({ resizable: false, minHeight: 0, create: function() { $(this).css("maxHeight", 400); } }); Check out test case on jsFiddle . I use this: $('#dialog').dialog({ maxHeight: $(window).height(), open: function() { $(this).dialog('option', 'maxHeight', $(window).height()); } }); Resetting

jQuery UI - Error: cannot call methods on dialog prior to initialization; attempted to call method 'open' [duplicate]

廉价感情. 提交于 2019-12-03 02:55:38
This question already has an answer here: jquery ui Dialog: cannot call methods on dialog prior to initialization 11 answers [Solved] I write this script. Unfortunately, jQuery console throw: Error: cannot call methods on dialog prior to initialization; attempted to call method 'open' I use jQuery 1.10.2 and jQuery UI 1.10.4. $(function() { $("#player").on('click', 'img', function() { var zadanie = $( "input[name^='act']:checked:enabled" ).val(); switch(zadanie){ case '1': alert('fajowo jesteś uczciwy'); break; case '2': $( "#dialog" ).dialog( "open" ); break; } }); }); Dialog in HTML: <div id

jQuery dialog with dynamic content

北战南征 提交于 2019-12-02 23:56:29
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 know what's going on? Nick Craver Your code works, you can test it here , that means you probably have a

How to remove jQuery-ui dialog title bar?

半世苍凉 提交于 2019-12-02 21:59:11
I am trying to hide jQuery-ui dialog 's title bar but keep the close button in the title bar visible. I have searched lots of post on stackoverflow like this one . In each post the title bar is hidden but the space taken by the bar is still there. I want to remove that space also but without removing the close button. How can i do this? Salman A Based on this answer : Use .dialog("widget") option to locate the div wrapper for the dialog. The wrapper contains all the markup used for the dialog including header, title bar and close button; and the dialog content itself. Here is one way to invoke