[thelist] Parent and Child Windows

Richard Morris thelist at web-designers.co.uk
Fri Feb 27 09:58:57 CST 2004


I'm sure I should know this!

When I open a pop-up 'help' window, I use this script in the Head section:

<script language="JavaScript"><!--
function openWin1(num) {
  n =
open('s'+num+'.htm','_blank','width=450,height=450,menubar=yes,scrollbars=ye
s,resizable=yes');
}
// -->
</script>

With this in the body:
<a href="javascript:openWin1(999)" onMouseOver="window.status='blah'; return
true">More...</a>

Which then opens the pop-up called s999.htm. These usually have a <a
href="javascript:window.close()">Close this window</a> statement to close
them and if they have 'external' hyperlinks then I add a target="_blank" to
those URLs.

But what script do I need to be able to get the original window to display
the contents of an 'internal' hyperlink? i.e. Window 1 displays Page A which
spawns Window 2 Page B and clicking on a hyperlink here loads Page C in
Window 1 (and even closes Window 2?).

Many thanks!



More information about the thelist mailing list