Parent-Child window communication

S

SJ

Here's the scenario

Website has a button that pops up a confirmation window
when clicked.
When the user clicks the "confirm" button in this popup
window, I want all the following to happen :
a) Form data on the Parent (opener) page to be submitted.
b) Some (asp.net) code behind executed for the Parent
page.
c) Pop-Up window to close.

What would be the best approach to do this?



-SJ
 
L

Lucas Tam

Website has a button that pops up a confirmation window
when clicked.
When the user clicks the "confirm" button in this popup
window, I want all the following to happen :

Use javascript to submit the parent page.
 
S

S. Justin Gengo

SJ,

I have a javascript in my Javascript componet which you can download for
free from my website, www.aboutfortunate.com, that contains code for
attaching a javascript confirmation window to asp.net Buttons. The code on
my site is all free and you can download the entire projects for any of the
components on the site (plus a help file). The javascript component contains
a lot of useful functions, but even if you don't find the whole component
useful you could always look at the source code and pull out just the pieces
you need.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

www.aboutfortunate.com

"Out of chaos comes order."
Nietzsche
 
S

sreejith.ram

a) window.opener.document.forms[0].submit();
b) Submitting page would execute the code behind method in Page_Load
c) window.close();
 
S

SJ

a) window.opener.document.forms[0].submit();
b) Submitting page would execute the code behind method in Page_Load
c) window.close();

Just out of curiosity, What if I want to pop-up a window with
some form data that needs to be submitted? Would it be wise
to have a pop-up like that or just change my design to incorporate
this form data into my main-page?
The reason I ask this is because don't browsers like firefox do a
real good job of preventing pop-up windows? Is it possible to fool
the browser and open a window anyway? If so, how.

-SJ
 

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,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top