Popup Image Window, Auto Size??

Discussion in 'JavaScript' started by Wheelz, Jan 25, 2007.

  1. #1
    Hi,

    I have a table with a selection of thumbnails all the same size and want each to open a popup window. This is not a problem until I find that one of the images is portrait and all the others are landscape. It still displays but you have to scroll the image.
    I have the script in the head with size control which would be ok if all the pics were the same dimension.
    Is there a way to make the popup window autosize, ie. to fit the contents?
    I'd prefer to keep it as an "image" popup as opposed to an "html" popup.

    This is what I have so far:

    </style>
    <script language="JavaScript"><!--
    function popup(image){
      cuteLittleWindow = window.open(image, "littleWindow", "location=no,width=640,height=480,scrollbars=auto");
    }
    //--></SCRIPT>
    Code (markup):
    blah...blah...

    <td align="center"><a href="java script:popup('paintball/pics/Speedball001.jpg')"><img src="paintball/pics/Speedball001_t.jpg" border="0" width="100" height="100"></a></td>
    
    Code (markup):
    Any help appreciated

    Cheers
     
    Wheelz, Jan 25, 2007 IP
  2. Wheelz

    Wheelz Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Thanks anyway, I found the answer. :)
     
    Wheelz, Jan 25, 2007 IP