Close window button

S

Steve

I'd like to put a button on a page that closes that page.
The page opens when the user clicks on a hyperlink in
another page, and I want to give the user a button (other
than, obviously, the x in the upper right hand corner) to
close the window automatically. I've seen it done on
other sites, but don't see any help feature in FrontPage
that shows how to do it. I suspect it's with javascript
or something.

Thanks.
 
D

David Berry

<input type="button" value="Close Window" onClick="if (window.focus)
top.opener.focus(); top.close();">
 
L

Luke

Very helpful. How would you add this code to an "image", instead of
creating a button?
I have an "arrow" image which I would like to add to my web page so that my
visitors can click on it to go to the page that they visited.
Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top