locked
How to prevent a new window poping out in modal dialog RRS feed

  • Question

  • Hi all, 

    This is my first time to create isv page in CRM, so my question may be a little silly.

    I have create a asp.net page, which is called in a custom button in toolbar of an entity form by showmodaldialog in JavaScript. There is a button, server control, in this page. When it's clicked, it will update records of ids in the parameters in URL.

    Now whenever I click one button in the modal dialog, it will pop up an new window of my page. How can I prevent this?

    Another question is the display of the modal dialog is hard to adjust, and the property I set seems useless, is there any sample for me to refer to?

    Thanks in advance.


    Sunday, January 24, 2010 4:22 PM

Answers

  • Hi,

    The sample xml below shows how you would create a modal dialog using the ISV.config file in MS CRM.



    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModalDialog('http://www.microsoft.com','','dialogWidth:500px;dialogHeight:500px');" Client="Web">
                  <Titles>
                    <Title LCID="1033" Text="showMOdalDialog" />
                  </Titles>
                  <ToolTips>
                    <ToolTip LCID="1033" Text="description" />
                  </ToolTips>
                </Button>

    The is tested script and creates a modal dialog window.

    Hassan.


    Hassan Hussain | http://hassanhussain.wordpress.com/ | http://www.mscrmvirtualusergroup.com/
    Monday, January 25, 2010 2:11 PM

All replies

  • Hi,


    Can you please explain if you want the custom page code to run without poping a new dialog or if you want the page to open but not as a modal dialog?

    thanks,
    H.
    Hassan Hussain | http://hassanhussain.wordpress.com/ | http://www.mscrmvirtualusergroup.com/
    Monday, January 25, 2010 12:04 PM
  • Thanks for your reply.

    My page is intended to poped out in the modal dialog by my JavaScript code, and when I click a button in the page, another new window will pop out. What I want is to prevent the new window popping out from the dialog.


    Thanks,
    SW.
    Monday, January 25, 2010 1:45 PM
  • Hi,

    The sample xml below shows how you would create a modal dialog using the ISV.config file in MS CRM.



    <Button Icon="/_imgs/ico_18_debug.gif" JavaScript="window.showModalDialog('http://www.microsoft.com','','dialogWidth:500px;dialogHeight:500px');" Client="Web">
                  <Titles>
                    <Title LCID="1033" Text="showMOdalDialog" />
                  </Titles>
                  <ToolTips>
                    <ToolTip LCID="1033" Text="description" />
                  </ToolTips>
                </Button>

    The is tested script and creates a modal dialog window.

    Hassan.


    Hassan Hussain | http://hassanhussain.wordpress.com/ | http://www.mscrmvirtualusergroup.com/
    Monday, January 25, 2010 2:11 PM