473,898 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.l ocation.reload( ) , but it doesn't work.

Thanks a lot.
Jun 13 '06 #1
3 3587
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.returnVa lue) 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.l ocation.reload( ) , but it doesn't work.

Thanks a lot.

Jun 14 '06 #2
=?UTF-8?B?R8O2cmFuIEF uZGVyc3Nvbg==?= <gu***@guffa.co m> wrote in
news:e$******** ******@TK2MSFTN GP02.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.returnVa lue) 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.l ocation.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.r eload
()
--
*~!NumbLock!~*
Jun 14 '06 #3
NumbLock wrote:
=?UTF-8?B?R8O2cmFuIEF uZGVyc3Nvbg==?= <gu***@guffa.co m> wrote in
news:e$******** ******@TK2MSFTN GP02.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.returnVa lue) 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.l ocation.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.r eload
()


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

What the OP is talking about is the window.showModa lDialog 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
2564
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 popup I type the new item and then select "submit" I have to close the popup and update the loader window in order to find then new item inserted in the popup. Does someone know where I can find an example (or script) in order to see how managing...
4
3189
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 for the parent and finds the proper parent in the datagrid they then click on the accept button in the grid. Then I populate a session variable with the parent ID. I then go back to the main page and have it refresh using: ...
2
1865
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, with no problems or disturbances. However, a problem has since arisen: The search engines have indexed these popup pages. So, you load them, but there are no links on them, and there is no parent page. Many people would not check out the url and...
1
5235
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 false;"> The link to the popup window is at the bottom of the parent page (long) and I jump to it with a bookmark. Currently, after the refresh occurs, the parent page ends up back at the top. Is there a way to adjust the above code (or use a...
3
4800
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 popup A. How do i refer to the very first parent window? Visual...
3
10613
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 opened the pop-up but so far have failed. Here is my code: <% (ASP code which saves the photo in a database) %>
5
4623
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 program should update a database, close the window and refresh the parent window. My question is does anyone have a example of popup window wich will close it's self and refresh the parent window when a user clicks on a button? I know there are...
7
8717
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
2815
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. After the user clicks on the cancel button I want the DataList to refresh its self. How can I do that - how can I tell the DataList or the parent web page to refresh it's self from the Popup / User Control?
0
9992
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9839
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10853
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10480
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8034
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7187
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
6076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4295
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.