...

View Full Version : Resize popup after the window have opened!! Read for more ifon



Wobbler
06-15-2003, 02:35 PM
Well, I've got a news site and there is an image gallery.

When you click a image it will open it in natural size in a popup that's easy.

My open popup code:

<script>

function viewimage(url,name){
winpops=window.open(url,"","width=400,height=400,")
}

</script>


The link that opens the popup

<a target="_self" href="javascript:viewimage('viewimage.asp?bid=<%=RecSet("bid")%>&name=<%=RecSet2("titel")%>','<%=RecSet2("titel")%>');">
<img border="1" src="<%=RecSet("path")%>" width="76" height="76" align="top"></a>


Now I've got this so for but here comes the problem. I wan't the popup to resize after the size of the image. This after the popup has loaded. That because the images can be diffrent sizes and the the popup will be resized after the first image only and I don't want that, the popup must resize efter EVERY image...

A loading image... should be good too
;)

I forgot my adress

http://bobban.www2.dotnetplayground.com/6xsgp/default.asp?page=utforskagalleri&kid=4&namn=Half-Life%202

Skyzyx
06-15-2003, 06:38 PM
Maybe a derivative of this script will help you:

http://www.codingforums.com/showthread.php?s=&threadid=9836
http://host44.ipowerweb.com/~skyzyxco/scripts/imagepop.htm

It's based on this inner-resize script:
http://www.codingforums.com/showthread.php?s=&threadid=8665

Mr J
06-15-2003, 06:50 PM
Ok

:thumbsup:

Wobbler
06-15-2003, 06:56 PM
<img style="border-width: 0" src="<%=RecSet("path")%>" onLoad="resizeTo(document.bild.width+10,document.bild.height+29);" name="bild">



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum