Can't update iframe content with jquery
===

**iframe** is loaded dynamically into container **div** inside function.

With **cc.text(content);** I try to update #code content

I am not a javascript pro, so any comments are welcome:

		function ShowEditor(content) {
			var url = "XmlEditor/Editor.htm";
			slHost.css('width', '0%');
			jobPlanContainer.css('display', 'block');
			frame = $('<iframe id="' + jobPlanIFrameID + '" src="' + url + '" class="frame" frameborder="0" />');
			frame.appendTo(jobPlanIFrameContainer);

			$(frame).load(function () {
				var ifr = frame[0];
				var doc = ifr.contentDocument || ifr.contentWindow.document;
				var jdoc = $(doc);
				var cc = jdoc.contents().find("#code");
				// var tst = cc.text();
				// alert(tst);
				cc.text(content);
			});
		}


I get the text in commented code, but fail to update #code content.

iframe holds the following html where I omit details inside <head/> and <script/>:

    <!doctype html>
    <html>
    	<head></head>
    <body>
    <form>
    <textarea id="code" name="code">some texts</textarea>
    </form>
    </body>
    </html>