Results 1 to 3 of 3

Thread: Enlarge Image not working

  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Enlarge Image not working

    1) Script Title:

    thumbnailviewer2

    2) Script URL (on DD):

    http://www.dynamicdrive.com/dynamici...thumbnail2.htm

    3) Describe problem:

    I am able to get the script to work with the title, just not the image.

    http://thecampuscloset.com/selectgen...%20Dame%20Prep

    Mouseover the image and nothing. Mouseover the words and it works.

    I need it to also work when Mouseover the image. I have tried and tried. I am guessing it something very simply, but my brain hurts from trying so many combinations.

    This is not my code. Another programmer. I am not sure how elegant it is?

    I would also like to be able to click through if somebody clicks on the words, in this case "Boys Tops".

    4) Code:
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <tr>
    <? if($img[$k]["subname"]!="")
    { ?>
    <td><div align="center">
    <a href="subcatg.php?s=<? echo $img[$k]["subname"]?>">
    <?php
    if("images/subimg/".$img[$k]['image'] != '' && getimagesize("images/subimg/".$img[$k]['image']))
    {
    $size = getimagesize("images/subimg/".$img[$k]['image']);
    $pixel = explode('"',$size['3']);
    if($pixel[1] > 150)
    $width = 150;
    else
    $width = $pixel[1];
    if($pixel[3] >150)
    $height = 150;
    else
    $height = $pixel[3];
    }
    ?>
    <img border="2" src="images/subimg/<? echo $img[$k]["image"];?>" width="<?=$width?>" height="<?=$height?>" alt="<? echo $img[$k]["subname"]?>">

    </a></div>
    </td>
    </tr>
    <tr>
    <td><div align="center"><a href="images/subimg/<? echo $img[$k]["image"];?>" rel="enlargeimage::mouseover" rev="loadarea::subcatg.php?s=<? echo $img[$k]["subname"]?>"><? echo $img[$k]["subname"];$k++?></a></div></td>
    </tr>
    </table>


    Thank you for any helps.

    Gary
    Last edited by moods; 10-14-2007 at 11:53 PM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The image isn't linked. This is easy to see in the generated source (use your browser's 'view source' to see it). You need to create the same link around it that you are creating around the text trigger.

    Replace:

    Code:
    <img border="2" src="images/subimg/<? echo $img[$k]["image"];?>" width="<?=$width?>" height="<?=$height?>" alt="<? echo $img[$k]["subname"]?>">
    With:

    Code:
    <a href="images/subimg/<? echo $img[$k]["image"];?>" rel="enlargeimage::mouseover" rev="loadarea::subcatg.php?s=<? echo $img[$k]["subname"]?>"><img border="2" src="images/subimg/<? echo $img[$k]["image"];?>" width="<?=$width?>" height="<?=$height?>" alt="<? echo $img[$k]["subname"]?>"></a>
    You might want to change:

    border="2"

    to:

    style="border:2px solid blue;"

    due to the way linked image borders are treated in most browsers.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you.

    That does work now.

    I still would like to click on the original image or the description below and go to the link similar to the image that pops up.

    Thoughts?

    Gary

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
  •