HOW DO I PUT A CLOSE WINDOW LINK ON A WEB PAGE

X

xanadu99

I use Front Page Office XP. How do I put a link on a web page to close the
page. Thanks
 
W

Wally S

<a href="javascript:window.close()">Close Window</a>

You can put anything you like instead of "Close Window."

Wally S
 
D

DI

With text:

<a href="javascript:window.close();">Close This Window</a>

With a button:

<form>
<input type=button value="Close This Window" onClick="javascript:window.close();">
</form>
 
K

Kevin Spencer

If the window has not been opened by another window using the JavaScript
window.open() method, you need to set the "opener" property of the window
prior to calling "window.close()" or the user will be prompted. Example:

<a href="window.opener=self;window.close()">Close Window</a>

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Neither a follower
nor a lender be.
 
W

Wally S

It works okay for me, and I do not use a Javascript window opener. When I
set up the window in question, I simply use the "new window" option in the
hyperlinks dialog box.

Wally S
 
Top