Jquery get hit from tempary image
<p>Ok so what I am doing is creating an upload form for images that gets displayed as a thumbnail, sort of like a preview.  I have a set width that it is displayed and then in php on server side it is cropped to the size I want.  However, for client side preview I want to show it at the width I have specified but get the height of the image after being resized to the specified width and adjust it with javascript.  I hope that makes sense, anyway here is my code.  Im not very Jquery / javascript savy so I am probably missing something.</p>

<pre><code>&lt;script&gt;
    function readURL(input) {
        if (input.files &amp;&amp; input.files[0]) {
            var reader = new FileReader();
            var imgHeight = $(".previewlogo").height();

            reader.onload = function (e) {
                $('.previewlogo')
                    .attr('src', e.target.result)
                $('.droparea')
                    .attr('style', 'height:', imgHeight, 'px;')
            };

            reader.readAsDataURL(input.files[0]);
        }
 }

        &lt;/script&gt;
</code></pre>

<p>and then the html</p>

<pre><code>&lt;img class="previewlogo" src="#" alt="Click or Drag image here to add login logo"/&gt;
&lt;input type="file" class="droparea spot logoupload" name="logo" onchange="readURL(this);"/&gt;
</code></pre>

<p>at the moment it is giving the size of the broken image size 39px; and also I am seeming to have an issue mixing the code with html on the .attr() tage, I am sure I am overlooking something</p>
