473,897 Members | 3,236 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

refresh parent window on close showModalDialog ?

Is it possible to make the parent window refresh when a modal dialog is
closed? I know I can use

window.opener.l ocation.reload( true);

for a 'normal' window, but this doesn't work for showModalDialog . It is
modal as far as the client is concerned but not the server...

In my app I have a datagrid on the main aspx page, I pop up a modal dialog
to edit a record. On closing the modal dialog I'd like to refresh the
datagrid with the new data.

Simon
Nov 17 '05 #1
2 16157
We use showModalDialog a lot.
As solution we put on parent web form server side button with style =
"display:no ne"
inside client-side function which calls to showModalDialog we "press" this
button in case showModalDialog returns true:

if(showModalDia log(...))
{
document.all("b tnRefresh").cli ck();
}

in server-side event onclcik of this button(I called it "btnRefresh ") you do
what you want.(rebind etc...)
HTH

"Simon Storr" <ss****@sdasolu tions.com> wrote in message
news:un******** ******@tk2msftn gp13.phx.gbl...
Is it possible to make the parent window refresh when a modal dialog is
closed? I know I can use

window.opener.l ocation.reload( true);

for a 'normal' window, but this doesn't work for showModalDialog . It is
modal as far as the client is concerned but not the server...

In my app I have a datagrid on the main aspx page, I pop up a modal dialog
to edit a record. On closing the modal dialog I'd like to refresh the
datagrid with the new data.

Simon

Nov 17 '05 #2
Nice solution - that will do it nicely :o)

Thanks for your help guys!

Simon

"Anatoly" <an******@gilat .com> wrote in message
news:OQ******** ******@TK2MSFTN GP12.phx.gbl...
We use showModalDialog a lot.
As solution we put on parent web form server side button with style =
"display:no ne"
inside client-side function which calls to showModalDialog we "press" this
button in case showModalDialog returns true:

if(showModalDia log(...))
{
document.all("b tnRefresh").cli ck();
}

in server-side event onclcik of this button(I called it "btnRefresh ") you do what you want.(rebind etc...)
HTH

"Simon Storr" <ss****@sdasolu tions.com> wrote in message
news:un******** ******@tk2msftn gp13.phx.gbl...
Is it possible to make the parent window refresh when a modal dialog is
closed? I know I can use

window.opener.l ocation.reload( true);

for a 'normal' window, but this doesn't work for showModalDialog . It is
modal as far as the client is concerned but not the server...

In my app I have a datagrid on the main aspx page, I pop up a modal dialog to edit a record. On closing the modal dialog I'd like to refresh the
datagrid with the new data.

Simon


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
5196
by: J P Singh | last post by:
Hi Guys Wonder if someone can help me with this. I have a form where a user clicks a button which gives them a pop up windows to allow them to add the data. The user adds the data and click save. The pop window closes and refreshs the parent window to allow the entered data to be displayed. It was all working okay until couple of days back when it stopped.
2
23525
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent window to open a child window thru javascript window.open 2) I have some functionality in the child window that changes the data
6
2606
by: sramruttun | last post by:
hi I open a pop up window using window.showModalDialog. How can I close the parent window after the pop up appears ?
1
1345
by: Pravin | last post by:
Hi, I have a ASP.net webform opened. I want to open a model dialog box on the button click. When the dialog box is opened, the webform is shown blank because the post back is not complete unless i close the dialog box. How can i refresh the page only when the post back is completed i.e. refresh the page only when the server side processing is done?
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.
3
3587
by: Opa | last post by:
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.
1
7674
by: Curious Trigger | last post by:
Hi there, programming with Visual Studio 2005 and ASP.NET 2.0 I want to open a modal dialog from Default.aspx. I searched the net and many newsgroups but I couldn't find any solution. First I tried using two aspx pages with standard controls and all those post-backs and their attributes OnClientClick. Since this didn't work, i reduced it to a default.aspx page opening a pure html-page as a modal dialog.
1
2727
by: elizayiu | last post by:
Hi, I need to write a webpage which does the following: - open up a window and pass parameters into it (i.e. need to call showModalDialog() or showModelessDialog()) - contains jscript to support drag and drop objects from itself to the popup window - wait for user response in popup window and return results back to the parent window (i.e. calling showModalDialog() is preferred)
0
9990
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
9837
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
11250
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10850
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
9656
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8032
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
7185
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();...
2
4293
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3300
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.