Web Analytics Made Easy -
StatCounter Sliding Photo Gallery link to Pop UP - CodingForum

Announcement

Collapse
No announcement yet.

Sliding Photo Gallery link to Pop UP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sliding Photo Gallery link to Pop UP

    How would I make thumbnails link to a new pop up menu? and each time you click a thumbnail it opens in the same window rather than opening multiple windows? I want to edit the script from http://www.dynamicdrive.com/dynamic...trightslide.htm. Thanks so much for your help!!!

  • #2
    Your link doesn't work.

    .....Willy

    Comment


    • #3
      Sorry about that, the link is http://www.dynamicdrive.com/dynamici...ightslide.htm.

      Comment


      • #4
        Your link still doesn't work with the period on the end but
        enough of the URL showed this time so I could find the page.

        Add this script to the HEAD of your document:
        Code:
        <script type="text/javascript">
         <!--//
          function newImg(which){
           var theImg = new Image();
               theImg.src = which;
           var imgw = theImg.width;
           var imgh = theImg.height;
        
            if(imgw<100){imgw = 100};
            if(imgh<100){imgh = 100};
        
             var ImgWin = window.open('','imgwin',config='height='+imgh+',width='+imgw+',top=0,left=100')
               with(ImgWin.document){
                writeln('<html><head><title>Display Image</title></head>');
                writeln('<body onload="self.focus()" onblur="self.close()">');
                writeln('<div style="text-align:center">');
                writeln('<img src='+which+'></div>');
                writeln('<div style="text-align:center;font-size:9px">');
                writeln('<a href="#" onClick="self.close()">Close Me</a>');
                writeln('</div></body></html>');
                close();
               }
          }
         //-->
        </script>
        </HEAD>
        And change these lines in the Slider Script.

        From:
        //Specify the slider's images
        var leftrightslide=new Array()
        var finalslide=''
        leftrightslide[0]='<a href="http://"><img src="dynamicbook1.gif" border=1></a>'
        leftrightslide[1]='<a href="http://"><img src="dynamicbook2.gif" border=1></a>'



        To:
        //Specify the slider's images
        var leftrightslide=new Array()
        var finalslide=''
        leftrightslide[0]='<a href="dynamicbook1.gif" onclick="newImg(this.href);return false"><img src="dynamicbook1.gif"></a>'
        leftrightslide[1]='<a href="dynamicbook2.gif" onclick="newImg(this.href);return false"><img src="dynamicbook2.gif"></a>'


        .....Willy

        Comment

        Working...
        X