Closing the window

E

E O

I know how to create a hyperlink so that the link opens
on a new window. How can I create a hyperlink in the new
window so that when the user clicks on it the whole (new)
window closes, leaving the original window still on the
screen?

Also, can I possibly dictate the size of the new window?
How?
 
G

George Hester

How do you open the new window? As a child of the first, the parent done
with JavaScript? Like a popup? Then just this in the child window:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd" />
<html>
<head>
<meta http-equiv="Content-Script-Type" content="text/javascript" />
<title>A Popup</title>
</head>
<body>
<!-- -->
<a href="#" onclick="self.close;">Close Me</a>
</body>
</html>
 
J

Jack Brewster

Try a Google search for:
javascript close window

You'll find tons of hits on how to do that.

As for controlling the window appearance, you may want to check out the
free FrontPage add-in from Jimco Add-ins called "Spawn." You can find
it here:
http://www.jimcoaddins.com

I'm not sure, but it may contain the capability of generating a close
window script, as well.

Jack Brewster
FrontPage MVP
www.maxgeek.com
 
A

Andrew Murray

<a href="#" onclick="window.close();">Close this Window</a> is the text link way.

<input type="button" onclick="window.close();"> is the form-button way

<a href="#" onclick=window.close();"><img src="image.jpg"></a> is the image/link
method.
 
Top