taking text from textbox and putting into span in javascript
<p>I am doing a self print function by gathering all the HTML from the users screen and putting it into a variable which then displays a pop-up screen so the user can print that information.</p>

<pre><code>        var disp_setting = "toolbar=no,location=no,directories=no,menubar=no,";
        disp_setting += "scrollbars=yes, height=500, left=100, top=25";
        var content_vlue = document.getElementById("print_content").innerHTML;
        var docprint = window.open("", "", disp_setting);
        docprint.document.open();
        docprint.document.write('&lt;html&gt;&lt;head&gt;');
        docprint.document.write('&lt;/head&gt;&lt;body text="#000000" onLoad="self.print()"&gt;');
        docprint.document.write('&lt;table&gt;');
        docprint.document.write(content_vlue);
        docprint.document.write('&lt;/table&gt;');
        docprint.document.write('&lt;/body&gt;&lt;/html&gt;');
        docprint.document.close();
</code></pre>

<p><strong>UPDATE:</strong> 
OK thanks to many of the suggestions so far I'm starting to make some headway...</p>

<p>What I would like to do is instead of manipulating print_content, I would like to put print_content into a variable (i.e. content_vlue) and then manipulate content_vlue.</p>

<pre><code>var content_vlue = document.getElementById("print_content").innerHTML;
$("content_vlue").find("INPUT[type='text']").each(function(i){
var input = $(this);
input.replaceWith("&lt;span class='textinput'&gt;" + input.val() + "&lt;/span&gt;";
});
</code></pre>

<p><strong>Is there a way to do this?</strong></p>
