Binding a form variable in jQuery
<p>I'd like to compute a value and carry that computation in the form post, so what I do is:</p>

<pre><code>&lt;form&gt;
&lt;input name="myID" id="myID" type="hidden" /&gt;
&lt;/form&gt;
$('#myID').attr('value',myCalculation);
</code></pre>

<p>What I would like to do is display it as well, so I've added:</p>

<pre><code>&lt;div id="myIDdisplay"&gt;&lt;/div&gt;
$('#myIDdisplay').text(myCalculation);
</code></pre>

<p>Is there a better, more elegant way than duplicating the assignment of myCalculation to both the hidden form field and the displayed area?</p>

<p>I don't want the user to get confused in thinking that it's an input field, so I'd rather not display the input tag.  And I just can't trust CSS enough to think that CSS will remove the input border on every version of every browser.</p>
