modal forms and postback

Discussion in 'ASP .Net' started by Brian Henry, Jul 5, 2004.

  1. Brian Henry

    Brian Henry Guest

    Hi, is there a way to get a form to post back to a modal dialog box when it
    was posted from a modal dialog to start with? here is the problem... I have
    a form with combo boxes and when you select one then click on an add button
    it adds the item to a list box, but when you click on add (this is in a
    modal dialog box) it opens the postback in a new window outside of the modal
    dialog box, how do you force it to postback to the modal dialog? thanks
     
    Brian Henry, Jul 5, 2004
    #1
    1. Advertisements

  2. Brian Henry

    Natty Gur Guest

    Hi,

    Yes. it well Known behaviour of model windows. in order to work around
    put IFrame in your model window and place all previous model HTML inside
    IFrame. now, on postback no new window will be open.

    HTH

    Natty Gur[MVP]

    blog : http://weblogs.asp.net/ngur
    Mobile: +972-(0)52-8888377


    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Jul 5, 2004
    #2
    1. Advertisements

  3. I am using the following trick in modal windows with postback:

    <body>
    <!-- Set window name for the form to be loaded in the same window after
    round trip -->
    <script language="javascript">window.name="modal";</script>
    <form id="myForm" method="post" runat="server" target="modal">

    Eliyahu
     
    Eliyahu Goldin, Jul 5, 2004
    #3
  4. Brian Henry

    Teemu Keiski Guest

    Hi,

    simply in the modal window put this to the <HEAD>

    <BASE target="_self">
     
    Teemu Keiski, Jul 5, 2004
    #4
  5. Brian Henry

    Brian Henry Guest

    thanks that worked great!


     
    Brian Henry, Jul 5, 2004
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.