PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Closing child window and refreshing Parent window automatically

 
 
=?Utf-8?B?U2lsZWVzaA==?=
Guest
Posts: n/a
 
      13th Oct 2004
Hi

I have a btn in Parent.aspx page . On server_click() of the Btn, i am
opening a new window called the child.apsx window. Child window also have a
Btn. On serverClick of this Btn, I perform some operation . Once the
operation is done, i have to close the child window, and refresh the parent
window automatically.

I am able to close the child window automatically , But not able to refresh
the parent window.

Please help
Sileesh
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QWxsYW4=?=
Guest
Posts: n/a
 
      13th Oct 2004
hey. on the previous code i gave you, try adding this.

after you're done load the close window script
Dim strscript As String = "<script
language=javascript>refreshandclose();</script>"
If (Not Page.IsStartupScriptRegistered("clientScript")) Then
Page.RegisterStartupScript("clientScript", strscript)
End If

-- now on the html portion of your webform inject this script :
<head>
<script language='javascripts'>
function refreshandclose()
{
window.top.parent.location = 'parent.aspx';
window.setTimeout('window.top.close();', 1000);
}
</script>
</head>

tell me if it works.

"Sileesh" wrote:

> Hi
>
> I have a btn in Parent.aspx page . On server_click() of the Btn, i am
> opening a new window called the child.apsx window. Child window also have a
> Btn. On serverClick of this Btn, I perform some operation . Once the
> operation is done, i have to close the child window, and refresh the parent
> window automatically.
>
> I am able to close the child window automatically , But not able to refresh
> the parent window.
>
> Please help
> Sileesh

 
Reply With Quote
 
Alex
Guest
Posts: n/a
 
      13th Oct 2004
What if you were to pass to the child window the url of the parent window.
When you close the child window, redirect to the url of the parent window,
using javascript, use something like...

window.open(url);
window.close();

Or a combination thereof.

Alex

"Sileesh" <(E-Mail Removed)> wrote in message
news:017C0702-E9EA-4061-98D6-(E-Mail Removed)...
> Hi
>
> I have a btn in Parent.aspx page . On server_click() of the Btn, i am
> opening a new window called the child.apsx window. Child window also have

a
> Btn. On serverClick of this Btn, I perform some operation . Once the
> operation is done, i have to close the child window, and refresh the

parent
> window automatically.
>
> I am able to close the child window automatically , But not able to

refresh
> the parent window.
>
> Please help
> Sileesh



 
Reply With Quote
 
=?Utf-8?B?U2lsZWVzaA==?=
Guest
Posts: n/a
 
      14th Oct 2004
Hi Allan

It did work with some midifications.

Thx Anyways
Sileesh

"Allan" wrote:

> hey. on the previous code i gave you, try adding this.
>
> after you're done load the close window script
> Dim strscript As String = "<script
> language=javascript>refreshandclose();</script>"
> If (Not Page.IsStartupScriptRegistered("clientScript")) Then
> Page.RegisterStartupScript("clientScript", strscript)
> End If
>
> -- now on the html portion of your webform inject this script :
> <head>
> <script language='javascripts'>
> function refreshandclose()
> {
> window.top.parent.location = 'parent.aspx';
> window.setTimeout('window.top.close();', 1000);
> }
> </script>
> </head>
>
> tell me if it works.
>
> "Sileesh" wrote:
>
> > Hi
> >
> > I have a btn in Parent.aspx page . On server_click() of the Btn, i am
> > opening a new window called the child.apsx window. Child window also have a
> > Btn. On serverClick of this Btn, I perform some operation . Once the
> > operation is done, i have to close the child window, and refresh the parent
> > window automatically.
> >
> > I am able to close the child window automatically , But not able to refresh
> > the parent window.
> >
> > Please help
> > Sileesh

 
Reply With Quote
 
=?Utf-8?B?U29sZWwgU29mdHdhcmU=?=
Guest
Posts: n/a
 
      14th Oct 2004
Sileesh,

Check out Metabuilders' DialogWindow control. It's free and does a killer
job at making it easy to program with and against popup dialog windows:

http://www.metabuilders.com/Tools/DialogWindow.aspx

"Sileesh" wrote:

> Hi
>
> I have a btn in Parent.aspx page . On server_click() of the Btn, i am
> opening a new window called the child.apsx window. Child window also have a
> Btn. On serverClick of this Btn, I perform some operation . Once the
> operation is done, i have to close the child window, and refresh the parent
> window automatically.
>
> I am able to close the child window automatically , But not able to refresh
> the parent window.
>
> Please help
> Sileesh

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
closing parent window and child window JohnE Microsoft ASP .NET 0 10th Jan 2010 07:08 AM
Refreshing Parent window from child window Jeff Microsoft C# .NET 1 19th Aug 2008 10:42 AM
Refreshing a parent window from child. =?Utf-8?B?QXNoYQ==?= Microsoft ASP .NET 0 2nd Mar 2005 02:25 AM
Parent window not closing HTTP Connections made by child window Sameer Fegade Windows XP Internet Explorer 1 25th Feb 2004 05:51 PM
Closing Modal child dialog causes parent window to close JerryK Microsoft Dot NET Framework Forms 2 17th Sep 2003 01:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:40 PM.