Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Ads above images

    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

  • #2
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    Code:
    <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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •