modal-dialog

Implementing delegate methods for modal view controller data transfer

本秂侑毒 提交于 2019-12-05 02:37:00
问题 I have a simple project to present a modal view controller and transfer back a string based on which button in the modal VC that gets pressed. I based it all on watching the Stanford class on iTunes U. It looks like I have everything correct, but I get a couple of compiler warnings. First I get one called passing argument 1 of 'setDelegate:' from incompatible pointer type in TransferViewController.m Second I get four warnings called Invalid receiver type 'id <MyModalViewControllerDelegate>*'

Getting edit box text from a modal MFC dialog after it is closed

喜你入骨 提交于 2019-12-05 02:32:56
问题 From a modal MFC dialog, I want to extract text from an edit box after the dialog is closed. I attempted this: CPreparationDlg Dlg; CString m_str; m_pMainWnd = &Dlg; Dlg.DoModal(); CWnd *pMyDialog=AfxGetMainWnd(); CWnd *pWnd=pMyDialog->GetDlgItem(IDC_EDIT1); pWnd->SetWindowText("huha max"); return TRUE; It does not work. 回答1: The dialog and its controls is not created until you call DoModal() and as already pointed, is destroyed already by the time DoModal() returns. Because of that you

jQuery dialog always centered

杀马特。学长 韩版系。学妹 提交于 2019-12-05 02:28:02
How can I implement, that a jQuery modal dialog with auto width & height is always centered in the browser. Also after resizing the window of the browser. The following code doesn't work. I think the problem is the auto width & height. jQuery - code $("<div class='popupDialog'>Loading...</div>").dialog({ autoOpen: true, closeOnEscape: true, height: 'auto', modal: true, title: 'About Ricky', width: 'auto' }).bind('dialogclose', function() { jdialog.dialog('destroy'); }).load(url, function() { $(this).dialog("option", "position", ['center', 'center'] ); }); $(window).resize(function() { $(".ui

Bootstrap-modal pop up on top to Flash

百般思念 提交于 2019-12-05 02:23:25
问题 I am using the Twitter's Bootstrap plugin bootstrap-modal . It works well except for when there is a flash element behind it. When the bootstrap-modal dialogue box up, and there is a flash element behind it, the flash element is on top of everything else. How do I fix this? 回答1: You need to pass an attribute to the <object> or <embed> tag to allow html to display over your flash content, since this feature is turned off by default. So, add the following attribute to your tag and the modal

How to get values from a dialog form in VB.NET?

谁都会走 提交于 2019-12-05 02:22:40
I have a "frmOptions" form with a textbox named "txtMyTextValue" and a button named "btnSave" to save and close the form when it's clicked, then, I'm showing this dialog form "frmOptions" when a button "btnOptions" is clicked on the main form "frmMain", like this Private Sub btnOptions_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOptions.Click ShowOptionsForm() End Sub Private Sub ShowOptionsForm() Dim options = New frmOptions options.ShowDialog() End Sub How can I get in the main form "frmMain" the value inserted in the textbox "txtMyTextValue" when the

close one modal and open a new modal with one button

北城余情 提交于 2019-12-05 02:13:52
问题 I am using bootstrap and have a one modal that I would like to have a link on to another modal. I can't seem to figure this out and currently I am using the modal.close() and .modal('show') but that is not working. $('a#to3heart').click(function(){ $('#portfolioModal2').modal({onShow: function (dialog) { $.modal.close() $('#portfolioModal1').modal('show'); return false; } }); }); 回答1: use: $("#modal1").modal('hide'); $("#modal2").modal('show'); see: http://getbootstrap.com/javascript/#modals

foundation 5 reveal modal not working

时光总嘲笑我的痴心妄想 提交于 2019-12-05 02:04:00
问题 Good day to all, I'm using foundation 5 for my mini project. I want to use the reveal/modal feature of the framework. But it seems it does not work. index.html <!DOCTYPE html> <html> <head> <title>Job Posting</title> <link rel="stylesheet" type="text/css" href="../css/normalize.css"> <link rel="stylesheet" type="text/css" href="../css/foundation.min.css"> <script type="text/javascript" src="../js/vendor/custom.modernizr.js"></script> </head> <body> <a href="#" class="button" data-reveal-id=

catching Angular Bootstrap UI $uibModal closed event after the modal was closed

我的未来我决定 提交于 2019-12-05 01:55:04
I'm opening a modal window using $uibModal.open from another controller, and need to be notified when the modal window was closed completely (and not during closing...) so I'll be able to run a function. The code that opens the modal is as follows: var modalInstance = $uibModal.open({ templateUrl: "myModalContent.html", controller: "termModalCtrl", windowClass: 'app-modal-window', resolve: { 'params': function () { return id } } }); I saw some suggested solutions to use: modalInstance.result.then(function(result) { }); The problem is that the function callback is called prior to the actual

jquery ui dialog - live not working?

时光怂恿深爱的人放手 提交于 2019-12-05 01:45:26
问题 I'm using this dialog: http://docs.jquery.com/UI/Dialog To open dialog I do it this way: $('a.openModal').live("click", function() { var idArr = $(this).attr('id').split("OpenNote"); var id = idArr[1]; alert($(".modalNote#dialog-modal" + id).html()); $(".modalNote#dialog-modal" + id).dialog('open'); return false; }); This dialog is used to display content of note when title is clicked. When I generated html on pageload, then this works fine, but if I add html dynamically then dialog won't

How does “#” (hash mark, number sign) close a modal box?

寵の児 提交于 2019-12-05 01:43:10
I recently read this article about creating a pure CSS modal box: Creating a modal window with HTML5 & CSS3 I've tested the code and it works great. I'm using it for my site's contact and register/log-in pages. There is one part of the code I haven't fully grasped. How does this... <a href="#close" title="Close" class="close">X</a> ... close the box? There is nothing in the CSS that hides or removes an element with a close class, nor any similar function targeting href , #close or title . It's simply that one line of code by itself, and when the use clicks on it, the modal window closes