Forum Moderators: open
I want to have a webpage with a background picture(possibly in a table) that will be covered by approx. 18 other smaller pictures.
When someone clicks the smaller pictures, I want them to go to that sites page (either in a new tabbed browser, or new page, but not leave the main page and that picture to disappear revealing the larger background picture underneath.
Any help would be greatly appreciated!
<img onclick="reveal(this)" src="whatever.jpg" />
when someone clicks, do the two things you want to happen: hide the image, and open a new window.
put this in your <head>:
<script>
function reveal(elem){
elem.style.visible='hidden';
window.open(url,winname,options); // see the window.open command reference for tips
}
</script>
Going forward you'll need some way to tell reveal() which URL will be opened - I'm assuming each image will have a different URL - but this ought to get you started.