Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Closing child window and refreshing Parent window automatically

Reply
Thread Tools

Closing child window and refreshing Parent window automatically

 
 
=?Utf-8?B?U2lsZWVzaA==?=
Guest
Posts: n/a
 
      10-13-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
 
      10-13-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
 
      10-13-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" <> wrote in message
news:017C0702-E9EA-4061-98D6-...
> 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
 
      10-13-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
 
      10-14-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

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 ASP .Net 0 01-10-2010 07:08 AM
closing the child window and refreshing the parent window Ane007 The Lounge 1 05-05-2008 06:54 AM
Closing popup window when closing parent window? =?Utf-8?B?Vk1J?= ASP .Net 3 02-15-2007 08:29 AM
refreshing parent window when closing child jb61264@yahoo.com Javascript 2 06-25-2004 01:12 PM
Closing child window WITHOUT closing parent thomas Javascript 0 10-23-2003 04:10 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57