473,856 Members | 1,644 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Refresh Parent Page

How can I refresh the parent page from a popup window that was created using
window.showmoda ldialog? I would like to accomplish this using vbscript if
possible.
Mar 15 '06 #1
7 8715
You can always use java script to refresh the parent page...

window.opener.c allMyRefreshFun ction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@na vegate.com> wrote in message
news:eK******** ******@tk2msftn gp13.phx.gbl...
How can I refresh the parent page from a popup window that was created
using window.showmoda ldialog? I would like to accomplish this using
vbscript if possible.

Mar 15 '06 #2
I don't want to call call a routine on the parent page. I want to handle
everything in the modaldialogwind ow popup window.
"Winista" <na*********@ho tmail.com> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
You can always use java script to refresh the parent page...

window.opener.c allMyRefreshFun ction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@na vegate.com> wrote in message
news:eK******** ******@tk2msftn gp13.phx.gbl...
How can I refresh the parent page from a popup window that was created
using window.showmoda ldialog? I would like to accomplish this using
vbscript if possible.


Mar 15 '06 #3
I was just giving an example of calling routine. You can access any JS
variables (control instances etc.)on parent page from child window. You will
have to do it via JS.
What exactly you are trying to do then I may be able to give you more
specific answer about refreshing UI on parent page.

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@na vegate.com> wrote in message
news:u5******** ******@TK2MSFTN GP11.phx.gbl...
I don't want to call call a routine on the parent page. I want to handle
everything in the modaldialogwind ow popup window.
"Winista" <na*********@ho tmail.com> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
You can always use java script to refresh the parent page...

window.opener.c allMyRefreshFun ction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@na vegate.com> wrote in message
news:eK******** ******@tk2msftn gp13.phx.gbl...
How can I refresh the parent page from a popup window that was created
using window.showmoda ldialog? I would like to accomplish this using
vbscript if possible.



Mar 15 '06 #4
Ok. I have a page with a gridview control which is used to display a list
of records in a database table(s). If the user wants to add a new record,
they click "new" and a popup window displays. The popup window accepts data
from the user (name, number, date, etc) and is then submitted back to the
server when the users clicks an ok button. At this point I want to update
the database with the new record, close the popup window, and then refresh
the parent page so that it reflects the newly added record that was created
using the popup window.

"Winista" <na*********@ho tmail.com> wrote in message
news:ed******** ******@TK2MSFTN GP11.phx.gbl...
I was just giving an example of calling routine. You can access any JS
variables (control instances etc.)on parent page from child window. You
will have to do it via JS.
What exactly you are trying to do then I may be able to give you more
specific answer about refreshing UI on parent page.

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@na vegate.com> wrote in message
news:u5******** ******@TK2MSFTN GP11.phx.gbl...
I don't want to call call a routine on the parent page. I want to handle
everything in the modaldialogwind ow popup window.
"Winista" <na*********@ho tmail.com> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
You can always use java script to refresh the parent page...

window.opener.c allMyRefreshFun ction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@na vegate.com> wrote in message
news:eK******** ******@tk2msftn gp13.phx.gbl...
How can I refresh the parent page from a popup window that was created
using window.showmoda ldialog? I would like to accomplish this using
vbscript if possible.



Mar 15 '06 #5
You need to emit client script into the page. A literal way to do it:

Response.Write( "<script>window .opener.locatio n.href=window.o pener.location. href;</script>");

That's C#, but in VBScript you only need to add the language attribute to
the script tag and remove any semicolons. Javascript is better as only IE
understands VBscript.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ben Schumacher" wrote:
How can I refresh the parent page from a popup window that was created using
window.showmoda ldialog? I would like to accomplish this using vbscript if
possible.

Mar 15 '06 #6
when i just try to look at what the href property is of the opener object
i'm getting Object required: 'window.opener' . Here is the code I'm using in
the popup window that is created using window.showmoda ldialog.

<script language="vbscr ipt" type="text/vbscript">

Sub window_onload()

document.write( window.opener.l ocation.href)

End Sub

</script>

Any more ideas?
"Peter Bromberg [C# MVP]" <pb*******@yaho o.nospammin.com > wrote in message
news:89******** *************** ***********@mic rosoft.com...
You need to emit client script into the page. A literal way to do it:

Response.Write( "<script>window .opener.locatio n.href=window.o pener.location. href;</script>");

That's C#, but in VBScript you only need to add the language attribute to
the script tag and remove any semicolons. Javascript is better as only IE
understands VBscript.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Ben Schumacher" wrote:
How can I refresh the parent page from a popup window that was created
using
window.showmoda ldialog? I would like to accomplish this using vbscript
if
possible.

Mar 16 '06 #7
Ben,

Unfortuntately, Window.Opener isn't an object when you use
Showmodaldialog . To access the opener window object you can pass a
reference to it like this:

<parent-page>
window.showModa lDialog( 'modal_window.a spx', window, '' );
</parent-page>

<modal-window>
var parentWindow = window.dialogAr guments;
document.write( parentWindow.lo cation.href);
</modal-window>

This may not work on all browsers, check documentation for browser
support other than IE.

I hope this helps,
Carl

Mar 16 '06 #8

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

Similar topics

3
12934
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a recordset table on the 2nd graph page and because the user gets to it by clicking the graph, the page doesn't properly post to render the recordset table. I can click "Refresh" on 2nd page and table displays fine. Is there an ASP refresh command that...
4
3188
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
1863
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...
3
10611
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) %>
2
23517
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
2
23532
by: Jeronimo Bertran | last post by:
Hi, I have a page with a very data intensive grid which needs to be automatically refreshed constantly if a change is detected. In order to not refresh the complete page so often, I created an iframe on my page whose html has the refresh meta as follows : <meta http-equiv="refresh" content="10"> The iframe is effectivelyh refreshed every 10 seconds without having the
5
4619
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...
3
3586
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.
5
3755
by: =?Utf-8?B?Sm9obg==?= | last post by:
Hi, I used the following code to refresh the parent page, and it works very well (Thanks to Peter Bromberg "). Response.Write("<script language='javascript' type='text/javascript'{ window.opener.location = 'Default.aspx?Reload=100'; }</script>"); Response.Write("<script language='javascript' type='text/javascript'{ self.close(); }</script>");
0
9758
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
10692
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...
1
10772
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9527
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
7928
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
7086
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();...
1
4568
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
4169
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3195
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.