PDA

View Full Version : Closing a window


Fella
07-26-2005, 11:42 AM
These are two seperate questions. I have thumbnails that you click on that brings up a new window with a larger image.

1. Can I make the new window close out using the image?

2. Is it possible to make the window close out if you right click it?

I think it would be a lot easier and look better if you can close the new window by either left or right clicking on it with out having a small button to click. I can make the image fill the entire window. Can anyone help me with this? Thanks.

Jon Hanlon
07-26-2005, 06:02 PM
<img onclick="self.close()">

<body oncontextmenu="self.close()">

Note that you must create the new window through script if you want to close it through script.