Java and Javascript are completely different things.
Basically, when you click on one of your images, a new page is displayed showing the larger version and the close button. This page that is opened is just another HTML file.
Use the window.open method in the onClick within a img tag.
Code:
window.open("http://www.domain.com/popup.html","Photograph","resizable=1,width=200,height=100");
With the window.open() method, you have several properties that can be specified, such as window title, whether it's resizable, etc. They are all self explanatory.
Then, with the HTML file that is to be pop-uped, you need to add a self.close() method.
This can be done with any element, however it is easily accomplished with the <a> tag:
HTML Code:
<a href="javascript: self.close()" title="Close current window">Close</a>
__________________
Please login or register to view this content. Registration is FREE - Tumblog with thoughts, quotes, links, videos, images and my creations.
Please login or register to view this content. Registration is FREE - The best free web browser.
Please login or register to view this content. Registration is FREE - Firefox is now Firefail.
|