set with/height of embed iframe like youtube
<p>When you embed a movie from youtube, you have the opportunity to change the width and height of the iframe element. When you type in your desired values, you see that the html code inside the texarea is changed so the user can just copy paste.</p>

<p>How do you make this happen?</p>

<p>This is what I tried:</p>

<pre><code>&lt;input type="text" id="width"&gt;

&lt;textarea id="code"&gt;
    &lt;iframe src="..." width="224" height="144" frameborder="0" id="embed-widget"&gt;&lt;/iframe&gt;
&lt;/textarea&gt;

&lt;script&gt;
$(function() {
    $('#width').keyup(function(){
        var new_width = $(this).val();
        $('#embed-widget').attr('width',new_width);
    });
});
</code></pre>

<p></p>

<p>This don't work inside the textarea, but the exact same code work on the iframe element itself on the page (when I put the id on to it)</p>

<p>Also, is there a easy way to make the whole text marked when the user clicks the text area?</p>
