# Resizing pop up windows based on image size

**URL:** <https://forum.kirupa.com/t/resizing-pop-up-windows-based-on-image-size/164509>\
**Category:** Uncategorized\
**Created:** [October 2, 2005, 4:50am UTC](https://forum.kirupa.com/t/resizing-pop-up-windows-based-on-image-size/164509 "2005-10-02T04:50:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![eurosickwitit](https://avatars.discourse-cdn.com/v4/letter/e/6f9a4e/32.png) [@eurosickwitit](https://forum.kirupa.com/u/eurosickwitit)\
**Post date:** [October 2, 2005, 4:50am UTC](https://forum.kirupa.com/t/resizing-pop-up-windows-based-on-image-size/164509/1 "2005-10-02T04:50:31Z")

</div>

I don’t think anyone asked that question before. They did ask about popups for thumbnail galleries in flash, but never mentioned a popup window that will resize itself without knowing the image dimension.

So here is the deal:  
I have a thumbnail gallery in flash and i want to open a new popup window after user clicks on any thumbnail. But I want the popup to automatically resize itself based on the image width and height, plus maybe like 10 px border around. IMPORTANT part is that i dont want to specify the width and height of the image in my xml file for my gallery. I just want each thumbnail to point to an image such as “images/picture1.jpg”, and then I want that window to automatically resize to the image’s size. Now i know there must be a way. im thinkin javascript but i kno nothing about it, and it seemed to me like a client side question so please somebody help me and I will be grateful.
