FAQ Database Discussion Community

$.validator.unobtrusive.parse not work when load partial view to jquery-ui dialog?

I have a partial view for my login dialog content. In my page i have <input type="button" value="Open" onclick=" OpenDialog() "/> <div id="dialog"> </div> Here is the code that is on the page for load partial view to dialog: <script type="text/javascript"> $(document).ready(function() { $('#dialog').dialog({ autoOpen: false, width: 400, height: 300,...

jquery dialog jumpscroll issue

I've been searching for solutions for ages but I can't find any good fix for this issue. Please see the video: screencast.com/t/dKf9mzp1 The steps: Open a dialog box, then in the main dialog box, I have another event to open another dialog box. When I click the bottom contents, it...

Jquery UI dialog cancel button as link?

How can change JQuery UI Dialog box Cancel button as link at same location after Delete button? $("#deletedialog").dialog({ height: 200, width: 500, buttons: { "Delete": { text: "Delete", class: "btn btn-success", click: function () { $(this).dialog("close"); $.ajax({ url: urlpost, type: 'Post', data: formData, success: function (result) { $('#' + container).html(result);...

How to pass the button name as variable in jquery dialogue box

I want to call the default action of dialogue box button, so please tell me how to pass the variable in side the dialogue box initialization. Here is my try for that : Calling the dialogue box with default function of 'Yes' button $( "#confirmComplete" ).dialog( "option", "buttons:Yes"); $( "#confirmComplete"...

Show UI dialogs using data-popup attributes

I am using jquery ui dialog to show more than one popup on one page, each popup will have its own ID and it will be triggered by an anchor with a data-popup="" attribute. For example, <a class="popup-button" data-popup="#popup-a">POPUP A</a> Will trigger the popup that has the ID #popup-a Below...

jQuery validate plugin inside a jquery UI dialog for SharePoint page application

I create custom SharePoint page and I need validate form in dialog window. For this i use jqueryvalidation.org. But it doesn't work for me, I'm confused. Have page with ContentPlaceHolderID="PlaceHolderAdditionalPageHead": <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Import Namespace="Microsoft.SharePoint.ApplicationPages" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c"...

jquery-ui modal dialog background

Trying to change the background of a jquery-ui modal dialog as it is transparent but it's not working. As per jquery-ui documentation what I tried is: .ui-dialog, { background: black; } .ui-dialog-content { background: black; } in my main CSS file but with no success. ...

Checking if dialog isOpen throws “cannot call methods on dialog prior to initialization” error

I'm using a dialog and checking it with the code that i found in the docs var isOpen = $( "#dialogName" ).dialog( "isOpen" ); $("#here").on("click", function(e){ if(isOpen){ $("#dialogName").dialog("close"); } }); Sometimes I get the error: Uncaught Error: cannot call methods on dialog prior to initialization; attempted to call method 'close'...

JQuery 1.11.2 cannot call methods on dialog prior to initialization; attempted to call method 'destroy'

I recently 'upgraded' from JQuery 1.3 (I know, I know, this project is 6 years old and I'm taking it over from another developer in hopes to get it done...properly) to 1.11.2, using JQuery Migrate v1.2.1 since going version to version might take me the rest of my life. Anyways,...

Remove outer jquery UI dialog scroll and add inner scroll to a div

I want to remove the outer dialog scroll bar and make a section inside the dialog scrollable. I was able to remove the outer dialog scroll bar by setting overflow:visible on the dialog but i tried to put overflow:hidden on the div I want scrollable inside the dialog but it...

How to adapt the jQuery dialog width to mobile browsers?

I use jQuery dialog as pop-up form in my web application (ASP .NET MVC, bootstrap css style). When I open the web application in a mobile browser the dialog does not adapt to the display width. It possible to style the dialog for mobiles?

Randomly reposition jQuery UI dialog (easter egg)

I am currently implementing an easter egg feature in my application. Whenever the user hovers over a jQuery UI close button, the dialog div should randomly reposition (so the user can't close it). Here is what i tried so far: $('.ui-icon-closethick').hover(function() { console.log("hover"); $('#trollDialog').dialog('option', 'position', [randomX, randomY] ); }); Unfortunately...

Position of dialog box not in the center of the web browser

I have the following php and java script am working on,as soon as the label_dialog box pops-up ,it opens to the top left corner of the browser even though I have it as center..can anyone help to figure out why it is not in the center? php code:- <div id="label_dialog"...