Results 1 to 2 of 2

Thread: Thumbnail Viewer not enlarging?

  1. #1
    Join Date
    Apr 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy Thumbnail Viewer not enlarging?

    Hi all,
    Regarding this script:
    http://www.dynamicdrive.com/dynamicindex4/thumbnail.htm

    The function in there states
    Code:
    function enlarge(which, e, position, imgwidth, imgheight){
    yet it doesn't enlarge the image. perhaps i'm being too literal because i was hoping this awesome script would indeed actually enlarge the image. I mean, what's the point of pasing in the optional imgwidth and imgheight parms anyway?

    is there a way to really enlarge the image with this script, aside from keeping two versions of the same image (one thumbnail and one 'original' size)?

    Thanks.
    Last edited by rxsid; 10-09-2005 at 07:16 AM.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,140
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    The "imgwidth" and "imgheight" parameters were originally designed just so the script knows how to center the image based on its dimensions. But if you want the script to also actually enlarge the image using such values, simply change:

    Code:
    crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">Close</span> </div><img src="'+which+'">'
    to:

    Code:
    crossobj.innerHTML='<div align="right" id="dragbar"><span id="closetext" onClick="closepreview()">Close</span> </div><img src="'+which+'" width="'+imgwidth+'px" height="'+imgheight+'px">'

Bookmarks

Posting Permissions

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