Click here to get back home

Refreshing the Parent

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Refreshing the Parent Mark 03-31-2006
Get Chitika Premium
Posted by Mark on March 31, 2006, 2:37 pm
Please log in for more thread options


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

Posted by Thomas 'PointedEars' Lahn on March 31, 2006, 2:53 pm
Please log in for more thread options


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

Posted by Stan Brown on March 31, 2006, 8:33 pm
Please log in for more thread options


> 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/2003/05/05/why_we_wont_help_you

Posted by pegasusflightresources@gmail.c on March 31, 2006, 11:57 pm
Please log in for more thread options


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.


Similar ThreadsPosted
CSS Bug?? background-image - Not Refreshing October 25, 2005, 10:39 am
Refreshing part of a HTML page with each request February 8, 2005, 1:02 pm
CSS parent problem March 21, 2005, 5:08 pm
subwindow - refresh parent July 23, 2007, 2:56 am
HTML Refreshing Problem with Meta Tags, Anchors, Commas, Semicolons April 25, 2006, 12:25 pm
Target frame link anchor in new parent html file December 13, 2004, 3:47 am
Activating parent page link from 'child page' - revised June 3, 2005, 11:30 am
How do I pass a list of arguments from a popup window to the parent window? July 6, 2006, 4:49 am
Results from child window submit into parent window, then child closes -- How To? February 4, 2005, 2:32 am

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap