473,395 Members | 1,616 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Refresh Parent Page

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.
Mar 15 '06 #1
7 8676
You can always use java script to refresh the parent page...

window.opener.callMyRefreshFunction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@navegate.com> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
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.

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

window.opener.callMyRefreshFunction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@navegate.com> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
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.


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*********@navegate.com> wrote in message
news:u5**************@TK2MSFTNGP11.phx.gbl...
I don't want to call call a routine on the parent page. I want to handle
everything in the modaldialogwindow popup window.
"Winista" <na*********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
You can always use java script to refresh the parent page...

window.opener.callMyRefreshFunction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@navegate.com> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
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.



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*********@hotmail.com> wrote in message
news:ed**************@TK2MSFTNGP11.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*********@navegate.com> wrote in message
news:u5**************@TK2MSFTNGP11.phx.gbl...
I don't want to call call a routine on the parent page. I want to handle
everything in the modaldialogwindow popup window.
"Winista" <na*********@hotmail.com> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
You can always use java script to refresh the parent page...

window.opener.callMyRefreshFunction();

--
Netomatix
http://www.netomatix.com
"Ben Schumacher" <bs*********@navegate.com> wrote in message
news:eK**************@tk2msftngp13.phx.gbl...
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.



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

Response.Write("<script>window.opener.location.hre f=window.opener.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.showmodaldialog? 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.showmodaldialog.

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

Sub window_onload()

document.write(window.opener.location.href)

End Sub

</script>

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

Response.Write("<script>window.opener.location.hre f=window.opener.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.showmodaldialog? 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.showModalDialog( 'modal_window.aspx', window, '' );
</parent-page>

<modal-window>
var parentWindow = window.dialogArguments;
document.write(parentWindow.location.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
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...
4
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...
2
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,...
3
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...
2
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...
2
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...
5
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...
3
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...
5
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'{...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...
0
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...
0
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...

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.