Update text with submitted data w/jQuery
<p>I have a form on a page. I have a link acting as submit button. The value is sent to a php page via ajax where the value is set into a session.</p>

<p>After submit I swap the form with text field where the text is displayed. How do I use the text from the submitted form to display withing <code>&lt;pre&gt;&lt;/pre&gt;</code> tags?</p>

<pre><code>$("#btnPreview").click(function() {
    var custM = $("#inviteMsg").val();          
    $.ajax({
        url: "ajax.php",
        type: "POST",
        data: "msg="+custM
    });     
});

&lt;div id="customMsgPreview"&gt;
    &lt;div class="rollSec"&gt;
    &lt;pre&gt;
      // SUBMITTED TEXT NEEDS TO APPEAR HERE 
      '.$tstLnk.'
    &lt;/pre&gt;
&lt;/div&gt;
</code></pre>
