...

View Full Version : Ads above images



javahhh
03-12-2004, 07:35 PM
Hi
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, 02: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')
with(imgWin.document){
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>');
writeln('</body></html>');
close();
}
}
//-->
</script>
</HEAD>


<body>

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

.....Willy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum