jQuery: Post form to a modal window for previewing the entered data
<p>I am looking for a way to use jQuery to allow a user to look at a modal window "preview" of a form before they submit the form to be saved. </p>

<p>I have this working with javascript, the form is posted to a file named preview.php that iterates through the posted information. The script currently opens a new window. </p>

<p>I would like instead to use jQuery to post the form to a modal window for previewing. Does anyone have any thoughts on how to do this?</p>

<p>This is what I am currently using:</p>

<pre><code>&lt;script language="JavaScript"&gt;
function preview(form) {
  form.target='_blank';
  form.action='http://example.com/preview.php';
  form.submit();
}
&lt;/script&gt; 
&lt;input type="button" value="preview" onclick='preview(this.form)'&gt;
</code></pre>
