Form/window Close - Java Script in 2005/2008

Discussion in 'ASP .Net' started by Ryan, Apr 6, 2010.

  1. Ryan

    Ryan Guest

    I have a main page 'MyMainForm' containing a button. When this button is
    clicked; another form 'MySubForm' opens up which contains two buttons (OK &
    Exit).
    When OK button is clicked; the code behind this button processes some data
    and displays an alert and then goes back to 'MySubForm'.

    What do I need to do so 'MySubForm' is closed automatically when processing
    is done and OK is clicked on alert box?
    Ryan, Apr 6, 2010
    #1
    1. Advertising

  2. Ryan

    Mr. Arnold Guest

    Ryan wrote:
    > I have a main page 'MyMainForm' containing a button. When this button is
    > clicked; another form 'MySubForm' opens up which contains two buttons (OK &
    > Exit).
    > When OK button is clicked; the code behind this button processes some data
    > and displays an alert and then goes back to 'MySubForm'.
    >
    > What do I need to do so 'MySubForm' is closed automatically when processing
    > is done and OK is clicked on alert box?


    <http://www.javascript-coder.com/window-popup/javascript-window-close.phtml>
    Mr. Arnold, Apr 7, 2010
    #2
    1. Advertising

  3. "Ryan" <> wrote in message
    news:...

    > I have a main page 'MyMainForm' containing a button. When this button is
    > clicked; another form 'MySubForm' opens up which contains two buttons (OK
    > &
    > Exit).
    > When OK button is clicked; the code behind this button processes some data
    > and displays an alert and then goes back to 'MySubForm'.
    >
    > What do I need to do so 'MySubForm' is closed automatically when
    > processing
    > is done and OK is clicked on alert box?


    Forget completely about popup windows. Instead, use the AJAX modal popup
    extender:
    http://www.google.co.uk/search?aq=2&oq=AJAX modal&sourceid=chrome&ie=UTF-8&q=ajax modalpopupextender

    And you can safely ignore any website which contains <SCRIPT
    language="JavaScript1.2">- the "language" attribute of the <script /> tag
    was deprecated over fourteen years ago...


    --
    Mark Rae
    ASP.NET MVP
    http://www.markrae.net
    Mark Rae [MVP], Apr 7, 2010
    #3
    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:
    3,127
    Whitecrest
    Jun 1, 2004
  2. Replies:
    6
    Views:
    8,803
    sateeshranga
    Aug 7, 2008
  3. Iñaki Baz Castillo
    Replies:
    7
    Views:
    822
    Iñaki Baz Castillo
    Jan 12, 2010
  4. Matt
    Replies:
    0
    Views:
    213
  5. Shang Wenbin

    close current window using window.close()

    Shang Wenbin, Sep 1, 2005, in forum: Javascript
    Replies:
    10
    Views:
    356
    Gérard Talbot
    Sep 2, 2005
Loading...

Share This Page