post the form data in modal window and close the modal window.

Discussion in 'HTML' started by Matt, Jun 1, 2004.

  1. Matt

    Matt Guest

    In the following code, when user clicks Validate button in page1.asp,
    it will open
    page2.asp as a modal window. When the user click submit button in
    page2.asp,
    I expect to open page page3.asp as in page2.asp. However, it opens a
    new
    window for page3.asp. I guess this is because page2.asp is in modal
    window.

    What I want is: when the user clicks submit button in page2.asp, it
    will
    submit the form and open page3.asp, and closes page2.asp. What are the
    workarounds to my problem? Thanks!!

    =================== page1.asp ========================================

    function openWindow()
    {
    var params;
    var sReturn = window.showModalDialog("page2.asp",params,"dialogHeight:500px;
    dialogWidth:500px;");
    }

    <INPUT type="button" value="Validate" name="PopulateButton"
    onClick="openWindow()">

    ================== page2.asp
    ==========================================

    <FORM NAME="InputForm" ACTION="page3.asp" METHOD="POST">
    Matt, Jun 1, 2004
    #1
    1. Advertising

  2. Matt

    Whitecrest Guest

    In article <>,
    says...
    > What I want is: when the user clicks submit button in page2.asp, it
    > will
    > submit the form and open page3.asp, and closes page2.asp.


    Since you are assuming Javascript, why not just tell page2 to close
    itself after launching Page3?

    window.opener = null;
    self.close();

    --
    Whitecrest Entertainment
    www.whitecrestent.com
    Whitecrest, Jun 1, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Matt
    Replies:
    1
    Views:
    469
    Whitecrest
    Jun 20, 2004
  2. Matt
    Replies:
    1
    Views:
    181
    Roji. P. Thomas
    May 29, 2004
  3. Matt
    Replies:
    2
    Views:
    361
  4. Matt
    Replies:
    0
    Views:
    212
  5. gopal srinivasan
    Replies:
    0
    Views:
    217
    gopal srinivasan
    Nov 5, 2004
Loading...

Share This Page