473,387 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to refresh calling window from a popup window

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
3 3546
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
=?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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Giuseppe | last post by:
Hello, In my page test1.php I have a list box with a series of items. When I select an "Add new item" button, a popup window is called with a query string parameter test1.php?cmd=add. When in the...
4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
2
by: Bill S. | last post by:
Hey, I am trying to figure this out. The hyperlinks on my page open up a small popup window. I have no reason to refresh the parent page or what have you. I was living in a very happy world,...
1
by: Targa | last post by:
After I submit a form from a popup window, I use the following code to close the popup and refresh the parent window. <a href="#" onclick="window.opener.location.reload();self.close();return...
3
by: MEM | last post by:
Hello, I'd like to refresh the main or top most browser window from a child window. Specifically, child popup A is opened by a main browser window then child popup B is opened from within child...
3
by: nicver | last post by:
I am working on updating a Web site with a frameset. A page opens a pop-up window in which the user uploads pictures. Once the upload is done, I would like to refresh the content of the frame which...
5
by: Peter | last post by:
1) I have a C# web application and what I am trying to do is create a popup window from a link on the parent window 2) the popup window will have a button and when a user clicks on the button the...
7
by: Ben Schumacher | last post by:
How can I refresh the parent page from a popup window that was created using window.showmodaldialog? I would like to accomplish this using vbscript if possible.
4
by: Peter | last post by:
ASP.NET 3.5 I have a web page and this web page has a DataList, when user hovers the mouse over a picture in the datalist a popup appers, this popup is a User Control and it has a cancel button....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.