none
How to Show a Modal Dialog inside a Modal Dialog with a button Click? RRS feed

  • Question

  • Hi,

    How to Show a Modal Dialog inside a Modal Dialog with a button Click?

    Can anyone suggest me how it can be done.

    Thanks

    Monday, September 19, 2011 5:39 AM

Answers

All replies

  • Hi,

          I guess it should be possible. you need to re initialize new dialog box to achieve your task. 

        Check this article, to open and close dialog. You can open new dialog and close old one. 

     

     http://moustafa-arafa.blogspot.com/2011/08/how-to-openclose-modal-dialogs-in.html

     

    Regards

    Milan Chauhan

    • Proposed as answer by Shimin Huang Wednesday, September 21, 2011 9:27 AM
    • Marked as answer by Shimin Huang Friday, September 30, 2011 7:47 AM
    Monday, September 19, 2011 5:56 AM
  • Hi Milan

     

    function openPopup() {
    var options = {
    url: '/_layouts/MYSPDemo/DialogPage.aspx',
    title: 'Modal Dialog',
    allowMaximize: false,
    showClose: true,
    width: 600,
    height: 500
    }
    SP.UI.ModalDialog.showModalDialog(options);
    }

     

     

    input onclick="openPopup();" title="Open Modal" type="button" value="Open Modal Dialog"

    i need asp button not input button and have converted input button to asp button

    <asp:Button ID="btnSample" runat="server" Text="sample" OnClientClick="javascript:openPopup();" OnClick="btnSample_Click" />

    when i use asp button i can open the modal dialog but am not able to maximize,Close and not able to execute button functionality but when i use input button am able to operate all functionalities like Maximize,close,Button Click.

    how can i execute the functionality with asp button can u please suggest me.

    Thanks

    Monday, September 19, 2011 6:35 AM
  • Can you paste your code here.

     

    Regrads

    Milan Chauhan

    Monday, September 19, 2011 7:12 AM
  • i have done the same thing as you mentioned in the url and the change i did is i used asp button instead of input button

    Thanks


    Monday, September 19, 2011 7:14 AM
  • Hi Rihdus

        in java script function  allowMaximize: true, it will give maximize button. and add "dialogReturnValueCallback: demoCallback" for call back value.

    it may be help you.


    Navaratan Sharma
    • Proposed as answer by Shimin Huang Wednesday, September 21, 2011 9:27 AM
    • Marked as answer by Shimin Huang Friday, September 30, 2011 7:46 AM
    Monday, September 19, 2011 10:14 AM