Form/window Close - Java Script in 2005/2008

R

Ryan

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?
 
M

Mr. Arnold

Ryan said:
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>
 
M

Mark Rae [MVP]

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...
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top