Resizing image size using javascript
<p>I am trying to resize the image using javascript, but I am getting errors </p>

<pre><code> var y;
            var y = new Image();
            y.src = s;
            var wd = y.width/600;
            var ht =  y.height/600;


    if(ht&gt;wd){
        var rw=round(wd * (1/ht));
        var hw1 = ht * (1/ht);
        var hw=round(hw1);
    } else {
        var rw1 = (wd) * (1/wd); 
        rw=round(rw1);
        hw=round(ht * (1/wd));
    }
</code></pre>

<p>I am getting errors saying</p>

<p>Message: Object expected
Line: 27
Char: 2
Code: 0</p>

<p>Where line 27 is <code>rw=round(rw1);</code></p>

<p>Thanks
Jean</p>
