title: Set HTML of td element as value of hidden field
body: <p>I wanted to know how would I go about setting the HTML of my td element as the value of a hidden field.</p>
  
  <pre><code>&lt;td align="center"&gt;
         &lt;%if (inst_dm != null) {%&gt;
  
      ...some code..
  &lt;/td&gt;
    &lt;%} else {%&gt;
  
  &lt;td align="center"&gt; Contact not available.
     &lt;%}%&gt;
    &lt;input type="hidden" name="inst_dmhidden" value="&lt;%$(this).html().trim(); %&gt;"&gt;
  
  &lt;/td&gt;
  </code></pre>
  
  <p>So, what I basically want is, in the input field inst_dmhidden, either the value from (..some code..) part or 'Contact not available'.  </p>
  
  <p>Any thoughts about how to go about doing this?</p>
  
  <p>-Pritish.</p>