DoDialog

  • Thread starter Thread starter Just D
  • Start date Start date
J

Just D

Hi All,

Does anybody know, if I call a pop-up window as top.__doDialog, and do some
changes to my data, then close this pop-up page, how can I force a reload of
the main window to refresh the data?

In a few words, I'm having a main WebApp, I need to do something on the
database, enter a new data for example, I call a pop-up window, it makes
something and finally I close this window, how the main window should know
that it's time to reload the data from the database to show all changes made
by this dialog window?

Thanks,
Dmitri
 
Wow, in this case we probably can initiate a full refresh of the parent
page? Do you know how to do that? Maybe we can initiate a click on a
"refresh" button when we close the pop-up window? That's interesting How can
we call these methods from C# code, not from ASPX directly where the
"document." is accessible?

document.parentWindow.document.getElementById("myButton").click();

Thanks,
Dmitri

"Eliyahu Goldin"
 
Dmitri,

Do you create the popup with createPopup()? Then you can access any control
on the main form from the popup form via document.parentWindow. For example,
you can simulate a button click:

document.parentWindow.document.getElementById("myButton").click();

If the button is the server-side control, you can process OnClick event on
server side.

Eliyahu
 
Thanks a lot, I'm sure it will help.

Dmitri

Eliyahu Goldin said:
Dmitri,

If myButton is a webcontrol, then calling

document.parentWindow.document.getElementById("myButton").click();

from the client-side javascript should trigger postback and you should get
a
server-side event OnClick(). If you provide a C# code-behind handler for
this event, it should get called at this stage. In this code you can
refresh
whatever you want and it will be sent back to the client.

Eliyahu
 
Dmitri,

If myButton is a webcontrol, then calling

document.parentWindow.document.getElementById("myButton").click();

from the client-side javascript should trigger postback and you should get a
server-side event OnClick(). If you provide a C# code-behind handler for
this event, it should get called at this stage. In this code you can refresh
whatever you want and it will be sent back to the client.

Eliyahu
 
Back
Top