By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,373 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

How to refresh calling window from a popup window

P: n/a
Opa
Hi ,

I have a form with javasript which launches a popup via the showModalDialog()
method. I get the dialog to open, now I am trying to first get a reference
to the calling form from the popup and then do a refresh of the calling form.

Any ideas on how to get a reference to the calling form?
I tried window.parent.location.reload() , but it doesn't work.

Thanks a lot.
Jun 13 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You can't refresh the calling window from the popup, as it's waiting for
the showModalDialog call to return.

When you close the popup, return a value (in window.returnValue) that
indicates to the code in the calling window that it needs to refresh itself.

Opa wrote:
Hi ,

I have a form with javasript which launches a popup via the showModalDialog()
method. I get the dialog to open, now I am trying to first get a reference
to the calling form from the popup and then do a refresh of the calling form.

Any ideas on how to get a reference to the calling form?
I tried window.parent.location.reload() , but it doesn't work.

Thanks a lot.

Jun 14 '06 #2

P: n/a
=?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?= <gu***@guffa.com> wrote in
news:e$**************@TK2MSFTNGP02.phx.gbl:
You can't refresh the calling window from the popup, as it's waiting
for the showModalDialog call to return.

When you close the popup, return a value (in window.returnValue) that
indicates to the code in the calling window that it needs to refresh
itself.

Opa wrote:
Hi ,

I have a form with javasript which launches a popup via the
showModalDialog() method. I get the dialog to open, now I am trying
to first get a reference to the calling form from the popup and then
do a refresh of the calling form.

Any ideas on how to get a reference to the calling form?
I tried window.parent.location.reload() , but it doesn't work.

Thanks a lot.


Hi Guys. What opa wrote for a response to this can be true in a VB.net
windows forms application (depending on how the child form is called).
ASP.Net is a different animal. Web pages are stateless and have no
notion of modality. The javascript code to open the popup is processed
either during the page load, or is called in response to an onClick event
or something like that.

You can get a reference to the parent form using window.opener. To
refresh the parent form from the child you would use window.opener.reload
()
--
*~!NumbLock!~*
Jun 14 '06 #3

P: n/a
NumbLock wrote:
=?UTF-8?B?R8O2cmFuIEFuZGVyc3Nvbg==?= <gu***@guffa.com> wrote in
news:e$**************@TK2MSFTNGP02.phx.gbl:
You can't refresh the calling window from the popup, as it's waiting
for the showModalDialog call to return.

When you close the popup, return a value (in window.returnValue) that
indicates to the code in the calling window that it needs to refresh
itself.

Opa wrote:
Hi ,

I have a form with javasript which launches a popup via the
showModalDialog() method. I get the dialog to open, now I am trying
to first get a reference to the calling form from the popup and then
do a refresh of the calling form.

Any ideas on how to get a reference to the calling form?
I tried window.parent.location.reload() , but it doesn't work.

Thanks a lot.


Hi Guys. What opa wrote for a response to this can be true in a VB.net
windows forms application (depending on how the child form is called).
ASP.Net is a different animal. Web pages are stateless and have no
notion of modality. The javascript code to open the popup is processed
either during the page load, or is called in response to an onClick event
or something like that.

You can get a reference to the parent form using window.opener. To
refresh the parent form from the child you would use window.opener.reload
()


The question actually has nothing at all to do with ASP.NET.

What the OP is talking about is the window.showModalDialog method, that
is specific for Internet Explorer. It opens a page as a modal dialog,
and waits for the page to close before returning to the parent page.

As the parent page is busy running the Javascript code that opened the
popup, it can't be refreshed until the popup is closed.
Jun 14 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.