473,545 Members | 1,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refreshing parent window

Hi,

I have two forms, parentForm and childForm. parentForm has
a button(btn1) and a grid. childForm has a couple of
textboxes and a button.

The button on parentForm opens a new window of childForm:

btn1.Attributes ("onclick")="ja vascript window.open(... ."

In childForm a couple of textboxes are filled in and then
saved with the button using normal sql behavior.

I need some function to refresh the parentForm from the
childForm to get the parentForm to update (show) what's
been added to the grid.

Something like:

window.opener.m ethod

that will do the same thing as

Response.Redire ct("parentForm. aspx")

thus showing the added record in the grid.

Any help is appreciated.

TIA

/Kenneth
Nov 18 '05 #1
4 2296
window.opener.r efresh() and window.opener.r eload() should both work...

Hope this helps,

Mun

--
Munsifali Rashid
http://www.munsplace.com/

"Kenneth" <ke***********@ chello.se> wrote in message
news:02******** *************** *****@phx.gbl.. .
Hi,

I have two forms, parentForm and childForm. parentForm has
a button(btn1) and a grid. childForm has a couple of
textboxes and a button.

The button on parentForm opens a new window of childForm:

btn1.Attributes ("onclick")="ja vascript window.open(... ."

In childForm a couple of textboxes are filled in and then
saved with the button using normal sql behavior.

I need some function to refresh the parentForm from the
childForm to get the parentForm to update (show) what's
been added to the grid.

Something like:

window.opener.m ethod

that will do the same thing as

Response.Redire ct("parentForm. aspx")

thus showing the added record in the grid.

Any help is appreciated.

TIA

/Kenneth

Nov 18 '05 #2
You need to write the following javascript code when you want to refresh the
parent window

window.opener.l ocation.href = window.opener.l ocation.href;


--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Munsifali Rashid" <mun.news@#Remo veToReply#cordl essmouse.co.uk> wrote in
message news:eQ******** ******@tk2msftn gp13.phx.gbl...
window.opener.r efresh() and window.opener.r eload() should both work...

Hope this helps,

Mun

--
Munsifali Rashid
http://www.munsplace.com/

"Kenneth" <ke***********@ chello.se> wrote in message
news:02******** *************** *****@phx.gbl.. .
Hi,

I have two forms, parentForm and childForm. parentForm has
a button(btn1) and a grid. childForm has a couple of
textboxes and a button.

The button on parentForm opens a new window of childForm:

btn1.Attributes ("onclick")="ja vascript window.open(... ."

In childForm a couple of textboxes are filled in and then
saved with the button using normal sql behavior.

I need some function to refresh the parentForm from the
childForm to get the parentForm to update (show) what's
been added to the grid.

Something like:

window.opener.m ethod

that will do the same thing as

Response.Redire ct("parentForm. aspx")

thus showing the added record in the grid.

Any help is appreciated.

TIA

/Kenneth


Nov 18 '05 #3
Saravana,
window.opener. location.href = window.opener.l ocation.href;
is the one that works, but there's one thing that doesn't
work. When I save the first time, the result is not
showed, but when I save the next time the first saved
record is showed in the parentForm grid, and when saving
the third the second record is shown???

Any ideas?

Info for you: I use code behind in VB, and I have used a
normal javascript function between the <head> tags not a
Page.RegisterCl ientScriptBlock .

Upon calling the method in the javascript code I ise
webCtrl.Attribu tes("onlick").. .

/Kenneth
-----Original Message-----
You need to write the following javascript code when you want to refresh theparent window

window.opener. location.href = window.opener.l ocation.href;


--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Munsifali Rashid" <mun.news@#Remo veToReply#cordl essmouse.co.uk> wrote inmessage news:eQ******** ******@tk2msftn gp13.phx.gbl...
window.opener.r efresh() and window.opener.r eload() should both work...
Hope this helps,

Mun

--
Munsifali Rashid
http://www.munsplace.com/

"Kenneth" <ke***********@ chello.se> wrote in message
news:02******** *************** *****@phx.gbl.. .
> Hi,
>
> I have two forms, parentForm and childForm. parentForm has > a button(btn1) and a grid. childForm has a couple of
> textboxes and a button.
>
> The button on parentForm opens a new window of childForm: >
> btn1.Attributes ("onclick")="ja vascript window.open (...." >
> In childForm a couple of textboxes are filled in and then > saved with the button using normal sql behavior.
>
> I need some function to refresh the parentForm from the > childForm to get the parentForm to update (show) what's > been added to the grid.
>
> Something like:
>
> window.opener.m ethod
>
> that will do the same thing as
>
> Response.Redire ct("parentForm. aspx")
>
> thus showing the added record in the grid.
>
> Any help is appreciated.
>
> TIA
>
> /Kenneth


.

Nov 18 '05 #4
I solved it myself, took some time, but I used the
Page.RegisterSt artupScript with
window.opener.l ocation.href and it just smashed in.

Thanks.

/Kenneth
-----Original Message-----
Saravana,
window.opener .location.href = window.opener.l ocation.href;

is the one that works, but there's one thing that doesn't
work. When I save the first time, the result is not
showed, but when I save the next time the first saved
record is showed in the parentForm grid, and when saving
the third the second record is shown???

Any ideas?

Info for you: I use code behind in VB, and I have used a
normal javascript function between the <head> tags not a
Page.RegisterC lientScriptBloc k.

Upon calling the method in the javascript code I ise
webCtrl.Attrib utes("onlick"). ..

/Kenneth
-----Original Message-----
You need to write the following javascript code when you

want to refresh the
parent window

window.opener .location.href = window.opener.l ocation.href;

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Munsifali Rashid"

<mun.news@#Rem oveToReply#cord lessmouse.co.uk > wrote in
message news:eQ******** ******@tk2msftn gp13.phx.gbl...
window.opener.r efresh() and window.opener.r eload()

should both work...
Hope this helps,

Mun

--
Munsifali Rashid
http://www.munsplace.com/

"Kenneth" <ke***********@ chello.se> wrote in message
news:02******** *************** *****@phx.gbl.. .
> Hi,
>
> I have two forms, parentForm and childForm.parentForm has > a button(btn1) and a grid. childForm has a couple of
> textboxes and a button.
>
> The button on parentForm opens a new window ofchildForm: >
> btn1.Attributes ("onclick")="ja vascript window.open(...." >
> In childForm a couple of textboxes are filled in andthen > saved with the button using normal sql behavior.
>
> I need some function to refresh the parentForm fromthe > childForm to get the parentForm to update (show)what's > been added to the grid.
>
> Something like:
>
> window.opener.m ethod
>
> that will do the same thing as
>
> Response.Redire ct("parentForm. aspx")
>
> thus showing the added record in the grid.
>
> Any help is appreciated.
>
> TIA
>
> /Kenneth

.

.

Nov 18 '05 #5

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

Similar topics

4
8923
by: Jamie Jackson | last post by:
The crux of the problem is I only know if the popup *has been* opened, but not if it *is* open. Therefore, the script doesn't know whether to simply refocus, or whether to popup a fresh window. Are these the only solutions? * handle onerror in some creative way * hidden frames BTW, I do have the luxury of ignoring non IE 5.5+ browsers on...
1
1973
by: Vijay Kumar | last post by:
Hello all I have a window (call it the parent window) that when moved makes any children windows (windows that were opened by this window) move by the same distance in X & Y direction. I do this by using Javascript to keep ref to child window and call a moveBy() method on each child window when the parent window.onMove() event. This all...
4
4232
by: Sileesh | last post by:
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...
1
1720
by: hashya | last post by:
Hi, I am opening window(child) from current window(parent). Now I want to keep refreshing child window from parent window. How can I achieve this. e.g. var win = window.open('http://www.thescripts.com'); how to use "win" to keep refreshing thescript.com Thanks
13
7431
by: honey99 | last post by:
Hi! I have to fix a problem in JSP.Actually,i have a JSP page say Ex1.jsp.In this Ex1.jsp i have an anchor tag which links into another JSP page i.e when i click on the link another pop-up window will open.My problem is the pop-up window and the parent window has same combobox.if i add data through html form in pop-up window(Ex2.jsp) it enters...
4
3968
by: Buddha | last post by:
Hello, I posted this on two forums, without too much help .. and I am kinda stuck in this. I need to refresh the parent page from the second child window which is opened by the first child and the first child window closes after opening the second child. This is the second time I am typing the post, I lost all content because the site...
3
9155
by: gsuns82 | last post by:
Hi all, I am using modal window for some update purpose, the issue i am facing is,i am not able to refresh parent after closing modal window. The code i used: ------------------------ For opening modal window from parent window: ...
0
2052
by: Bali | last post by:
Default.aspx is the starting page containing a control(ascx) which has asp:button control on it. On the button click event it has to open a new page as a modal control. Since refreshing a page in a dialog box ended up opening up a new browser window with the aspx page, I read on a forum that I should use the iframe control and since I have...
1
9386
by: Bali | last post by:
Default.aspx is the starting page containing a control(ascx) which has asp:button control on it. On the button click event it has to open a new page as a modal control. Since refreshing a page in a dialog box ended up opening up a new browser window with the aspx page, I read on a forum that I should use the iframe control and since I have...
4
4364
by: Ria12 | last post by:
hi... I have grid in my Parent page on clik of gridview Edit column it open a Popup window fill all records for updation.But I have problem when user update a record popup window is not closed and also not refreshing Parent page..any body help me...
0
7459
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...
0
7393
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...
0
7653
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. ...
0
7803
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...
1
7411
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7749
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...
1
5322
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...
0
3439
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1012
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.