window.onresize call only once
<p>I am facing problem while resizing an image in the Popup brwoser window. </p>

<p>Image present in popup gets resized when the user resizes the browser window for the first time only, afterwards when the window resizes (dblclicking the titlebar, or using the resize handles) the image dimension remains equal to the last resized dimension.</p>

<p>My code is shown below:</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Enlarged Image&lt;/title&gt;
    &lt;script language="javascript" type="text/javascript"&gt;
       var arrTemp=self.location.href.split("?");
       var picUrl = (arrTemp.length&gt;0)?arrTemp[1]:"";
       var NS = (navigator.appName == "Netscape") ? true : false;

       function GetWidth() {
           var x = 0;
           if (self.innerHeight) {
               x = self.innerWidth;
           }
           else if (document.documentElement &amp;&amp; document.documentElement.clientHeight) {
               x = document.documentElement.clientWidth;
           }
           else if (document.body) {
               x = document.body.clientWidth;
           }
           return x;
       }

       function GetHeight() {
           var y = 0;
           if (self.innerHeight) {
               y = self.innerHeight;
           }
           else if (document.documentElement &amp;&amp; document.documentElement.clientHeight) {
               y = document.documentElement.clientHeight;
           }
           else if (document.body) {
               y = document.body.clientHeight;
           }
           return y;
       }

       window.onresize = function() { document.write("&lt;img src='" + picUrl + "' border=0 Name=image Width=" + GetWidth() + " Height=" + (GetWidth() * 3) / 4 + "/&gt;") }           

    &lt;/script&gt;
&lt;/head&gt;
&lt;body style='margin: 0px; text-align:center;'&gt;
    &lt;script language="javascript" type="text/javascript"&gt;
        document.write("&lt;img src='" + picUrl + "' border=0 Name=image Width=800 Height=600 /&gt;");            
    &lt;/script&gt;
&lt;/body&gt;
</code></pre>

<p></p>

<p>I am passing imgpath to this html file from my aspx file as shjown below:</p>

<pre><code>this.aspHyperlink.NavigateUrl = "javascript:PopupPic('." + this.aspImgCtrl.ImageUrl.Replace('~', '.') + "')";
</code></pre>

<p>The javascript PopupPic function is shown below:</p>

<pre><code>function PopupPic(sPicURL) {
    window.open("PopupEventImage.htm?" + sPicURL, "", "resizable=1,HEIGHT=600,WIDTH=800");
}
</code></pre>

<p>Any ideas for resizing the image every time the user resizes the popup window?</p>
