View Full Version : Ads above images

03-12-2004, 08:35 PM
i create a site using front page and have many images done into thumbnails. I need to place an banner ad above each image when the thumbnail is clicked. The ad would be html code from a rotator program. Can anyone help with a script or something similar that i do not know about;
Maybe images should open in a cell with a cell above it that refreshes each time;

Thanks in advance

Willy Duitt
03-13-2004, 03:10 PM
Although your post does not clearly state what you are displaying when the thumbnail is clicked. I'm assuming that you wish to display a full size image in a new window. The below script opens a new window with an ad image displayed above the thumbnail full size image.

<script type="text/javascript">
function newImg(ad,image){
var imgWin = window.open('','imgwin',config='height=500,width=700,top=175,left=175')
writeln('<html><head><title>Display Image</title></head>');
writeln('<body onload="self.focus()" onblur="self.close()">');
writeln('<div style="position:absolute;top:0;left:0">');
writeln('<img src='+ad+'></div>');
writeln('<div style="text-align:center">');
writeln('<img src='+image+'></div>');


<a href="fullSizeImage.jpg" onclick="newImg('myAd.jpg',this.href);return false">
<img src="thumnailImage.jpg" border="0"></a>