473,396 Members | 1,678 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.

Refreshing the Parent

I have a link on Parent.html which brings up Child.html in a separate
browser window. Child.html has a button with Javascript to close
itself. Is there a way I can cause Parent.html to be refreshed/reloaded
after Child.html is closed?

I don't care if it can be done in HTML, Javascript or PHP, just so it
can be done. Is there a way to do this?

Mark
Mar 31 '06 #1
3 1449
Mark wrote:
I have a link on Parent.html which brings up Child.html in a separate
browser window. Child.html has a button with Javascript to close
itself. Is there a way I can cause Parent.html to be refreshed/reloaded
after Child.html is closed?
No. But you can refresh/reload it before or when the window displaying
Child.html is closed.

if (window.opener && !window.opener.closed)
{
// or whatever you call refresh/reload
window.opener.location.reload();
}

window.close();
I don't care if it can be done in HTML, Javascript or PHP, just so it
can be done. [...]


You are mixing up things. HTML is a markup language, J(ava)Script and PHP
are programming languages. You need a programming language to do this.

BTW, PHP is on topic in comp.lang.php, not in ciwa._html_. The appropriate
newsgroup for this unspecified a question would have been only
comp.infosystems.www.authoring.misc.
F'up2 cljs

PointedEars
Mar 31 '06 #2
Fri, 31 Mar 2006 14:37:19 -0500 from Mark <Ma**********@noaa.gov>:
I have a link on Parent.html which brings up Child.html in a separate
browser window. Child.html has a button with Javascript to close
itself. Is there a way I can cause Parent.html to be refreshed/reloaded
after Child.html is closed?


There are just so many things wrong with that, on so many levels.
Just the first three that I thought of:

(1) Don't open or close windows on my desktop, please. I know how to
operate my own browser, thank you very much.

(2) Especially don't do things that depend on Javascript, since they
will fail for a significant minority of visitors.

(3) Don't reinvent the wheel. I already know how to close a window.
"Close" buttons are amateurish, even apart from the fact that they
don't work.

--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2.1 spec: http://www.w3.org/TR/CSS21/
validator: http://jigsaw.w3.org/css-validator/
Why We Won't Help You:
http://diveintomark.org/archives/200..._wont_help_you
Apr 1 '06 #3
This may be minutely possible as long as the parent.html and child.html
pages are opened in a frameset. In that case, then you can refresh the
web page to load Parent.html again while removing the frame for
Child.html. An example of this would be:
<html>
...
<frameset cols="50%,50%">
<frame src="Parent.html">
<frame src="Child.html">
</frameset>
</html>

For Child.html you would have to add in a script running a function
using the onClick attribute of buttons. The script might look like
this:
<script language="JavaScript">
function close_child()
{
location.href = "Parent.html";
}
</script>

You would have previously inserted a button looking like this in code:
<input type=button name="close" value="close this window"
onClick="close_child();">

You may want to vary the width of the frames and any other simple
features to fit your pages properly.

Apr 1 '06 #4

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

Similar topics

4
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. ...
1
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...
3
by: John Ortt | last post by:
I appologise for reposting this but I have been trying to find a solution all week with no avail and I was hoping a repost might help somebody more knowledgable than myself to spot the message... ...
1
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 =...
13
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...
3
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: ...
0
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...
1
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...
4
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...
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: 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
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
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,...

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.