---
title: "popup med automatisk height+width"
type: "forum-thread"
url: "https://www.webforum.nu/amne/javascript/127017-popup-med-automatisk-height-width"
topic: "JavaScript"
topic_url: "https://www.webforum.nu/amne/javascript"
author: "Frexuz"
published: "2005-04-24T19:36:11.000Z"
updated: "2005-04-24T20:18:51.000Z"
replies: 1
views: 326
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/javascript/127017-popup-med-automatisk-height-width"
---

# popup med automatisk height+width

## #1 — Frexuz, 2005-04-24T19:36Z

jag använder detta script just nu

```
	<script language="javascript">
	<!--
	function show(imageURL, width, height)
	{
	NewImageWindow=window.open("", "", "width="+width+",height="+height);
	NewImageWindow.document.open();
	NewImageWindow.document.write("<html><head><title>"+imageURL+"</title></head>");
	NewImageWindow.document.write("<body style='margin:0px;'><A HREF='javascript:window.close();'>");
	NewImageWindow.document.write("<img src='images/"+imageURL+"' width='"+width+"' height='"+height+"' alt='Click To Close' border='0'>");
	NewImageWindow.document.write("</A></body></html>");
	}
	//-->
	</script>
```

och öppnar med

```
<a href="javascript:show('bild.jpg',500,375)"><img src="images/bild.jpg" alt="" height="190" width="190" border="0" /></a>
```

men hur kan man göra så att man hämtar bildens storlek och gör rutan så stor? så jag slipper lägga till storleken i länken

Permalänk: https://www.webforum.nu/p/127017

## #2 — bossse, 2005-04-24T20:18Z

Kolla en bit ner i forumet, där jag har lite förslag.
Söker popupscript som anpassar sej   

<http://www.webforum.nu/showthread.php?s=&threadid=123900&forumid=24>

Permalänk: https://www.webforum.nu/p/1599248

---

Tråden på webben: https://www.webforum.nu/amne/javascript/127017-popup-med-automatisk-height-width
