From: Ryan on
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?
From: Mr. Arnold on
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>
From: Mark Rae [MVP] on
"Ryan" <Ryan(a)discussions.microsoft.com> wrote in message
news:58BB3636-95B8-4DBE-8771-961A207F3DC5(a)microsoft.com...

> 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