473,396 Members | 1,998 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,396 software developers and data experts.

Refresh a parent window???

I have a frameset. left and main. Inside the main frame I have a IFRAME. I
need to refresh the main frame when I post a form inside the IFRAME. I am
trying the code below with no luck??
Private Sub addMachine_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addMachine.Click

Dim sScript As New System.Text.StringBuilder
sScript.Append("<SCRIPT language=""javascript"">" & vbCrLf)
sScript.Append("parent.window.opener.location =
parent.window.opener.location;" & vbCrLf)
sScript.Append("</SCRIPT>" & vbCrLf)
RegisterClientScriptBlock("ForceDefaultToScript", sScript.ToString)
End Sub
--

______________________
David Fetrow
HelixPoint LLC.
http://www.helixpoint.com
da***@helixpoint.com

Interested in Affordable Email Marketing?
Check out the HelixMailer at http://www.helixpoint.com/helixmailer.asp
If you are interested in becoming a Reseller of HelixPoint products, contact
da***@helixpoint.com
______________________
Nov 17 '05 #1
1 4714
Hi

If you want to refresh the whole frameset then this is ok...
If you only want to refresh the frame/document the iframe is located in

parent.location.href = "pagetogo.aspx";
Or
parent.location.reload(true);
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"Helixpoint" <da**@helixpoint.com> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
This works:)

Private Sub addMachine_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addMachine.Click

Dim sScript As New System.Text.StringBuilder

sScript.Append("<SCRIPT language=""javascript"">" & vbCrLf)

sScript.Append("top.main.location = top.main.location;" & vbCrLf)

sScript.Append("</SCRIPT>" & vbCrLf)

RegisterClientScriptBlock("ForceDefaultToScript", sScript.ToString)

End Sub

"Helixpoint" <da**@helixpoint.com> wrote in message
news:eo**************@tk2msftngp13.phx.gbl...
I have a frameset. left and main. Inside the main frame I have a IFRAME. I need to refresh the main frame when I post a form inside the IFRAME. I am trying the code below with no luck??
Private Sub addMachine_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles addMachine.Click

Dim sScript As New System.Text.StringBuilder
sScript.Append("<SCRIPT language=""javascript"">" & vbCrLf)
sScript.Append("parent.window.opener.location =
parent.window.opener.location;" & vbCrLf)
sScript.Append("</SCRIPT>" & vbCrLf)
RegisterClientScriptBlock("ForceDefaultToScript", sScript.ToString)
End Sub
--

______________________
David Fetrow
HelixPoint LLC.
http://www.helixpoint.com
da***@helixpoint.com

Interested in Affordable Email Marketing?
Check out the HelixMailer at http://www.helixpoint.com/helixmailer.asp
If you are interested in becoming a Reseller of HelixPoint products,

contact
da***@helixpoint.com
______________________


Nov 17 '05 #2

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

Similar topics

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...
3
by: MEM | last post by:
Hello, I'd like to refresh the main or top most browser window from a child window. Specifically, child popup A is opened by a main browser window then child popup B is opened from within child...
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...
1
by: baggy | last post by:
Hi, I have a situation where I need to be able to refresh a windows parent parent. I can not seem to use anything like window.opener.parent.location.reload() as by the time I execute the...
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...
7
by: Ben Schumacher | last post by:
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.
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...
3
by: Natygan | last post by:
Hi, I've got a Web page which can become a parent window : some links use "window.open" to open the desired link into a new child window. This parent window has got an auto-refresh...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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.