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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    multiple sized images in popupwindows

    wondering if anyone can help me-I have thumbnails that expand into medium sized images that I want to expand into larger images in popup windows...I have managed to get the medium sized pics but can't seem to bring in the larger images...can anyone tell from my code what I am doing wrong?Any help would be appreciated..
    http://www3.telus.net/ellenjl/draft5.htm
    thank you

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts
    You may want to use better "popup image viewer" scripts by checking my sig.

  • #3
    Senior Coder angst's Avatar
    Join Date
    Apr 2004
    Location
    Toronto, Ontario
    Posts
    2,114
    Thanks
    15
    Thanked 122 Times in 122 Posts
    i'm looking for this script "popup image viewer"
    and i don't see it in your sig..?

    where can i find a copy?

  • #4
    Banned
    Join Date
    Sep 2003
    Posts
    3,620
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Here 'ya go.
    It looks like your still searching....
    (although Glenn did tell one time I needed a check to see if the image loaded prior to popping the popup. Perhaps he'll come by again and point out what he meant.)

    Code:
    <script type="text/javascript">
     <!--//
      function displayLarge(image){
       var theImage = new Image();
           theImage.src = image;
       var width  = theImage.width;
       var height = theImage.height;
           if(width <100) { width  = 100 };
           if(height<100) { height = 100 };
    
       var openWindow = window.open('','display','width='+width+',height='+height);
        with(openWindow.document){
          writeln('<html><head><title>My Title Here</title></head>');
          writeln('<body onload="self.focus()" onblur="self.close()"');
          writeln('style="background-image:url('+image+');');
          writeln('background-repeat:no-repeat;width:'+width+';height:'+height+'">');
          writeln('<div style="position:absolute;bottom:3px;left:0;text-align:center">');
          writeln('<span style="font-size:12px;width:100%">');
          writeln('<a href="javascript:self.close()">Close</a>');
          writeln('</span></div></body></html>');
          close();
        } return false;
      }
     //-->
    </script>
    </head>
    
    <body>
    
    <table><tr>
    <TD align="center"><a href="images/17.jpg" onclick="return displayLarge(this.href)">
    <IMG src="thumbnails/17.jpg" border="1" alt=17 width="55" height="70"></A></TD> 
    
    <TD align="center"><a href="images/18.jpg" onclick="return displayLarge(this.href)">
    <IMG src="thumbnails/18.jpg" border="1" alt=17 width="55" height="70"></A></TD> 
    
    <TD align="center"><a href="images/19.jpg" onclick="return displayLarge(this.href)">
    <IMG src="thumbnails/19.jpg" border="1" alt=17 width="55" height="70"></A></TD>
    .....Willy

  • #5
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    10,960
    Thanks
    0
    Thanked 236 Times in 233 Posts
    Quote Originally Posted by angst
    i'm looking for this script "popup image viewer"
    and i don't see it in your sig..?

    where can i find a copy?
    I already modified my sig to present my own scripts instead.

    I already replied to your PM but here's the link to that script.

    Willy, I don't remember saying that but probably what I told you was the display of "Loading..." title while the image is loading, which the 'Popup image viewer' has.


  •  

    Posting Permissions

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