title: Popup preview of textarea input
body: <p>I want to create a preview function for posts that allows people to view the output of what they enter into a textarea how it would appear once submitted. The forum uses bbcode and does not allow html in posts and the id of the textarea box is "message"</p>
  
  <p>Can anyone help me create a popup that would preview this post in a popup window without passing any of its data to a database and back?</p>
  
  <p>I should really have supplied more info, I realise... Basically we have a post form in the form of </p>
  
  <pre><code>&lt;textarea id=\"message\" name=\"message\" style=\"width:515; height:160; font-family: Verdana; font-size: 8pt; color: #000000\" onKeyDown=\"countit()\"&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>with a submit button </p>
  
  <pre><code>&lt;input type=\"image\" src=\"newlayout/images/reply.png\" height=\"35\" width=\"109\" border=\"0\" alt=\"Submit\"&gt;
  </code></pre>
  
  <p>When it's clicked, the form gets sent to another page, from where it's inserted into the database. I would like there to be a preview button like the one on livejournal, where a new popup gets created and shows what the post would look like. I looked at the source code on livejournal and it supplied jQuery, so I tried the code given here: <a href="http://haacked.com/archive/2009/12/15/live-preview-jquery-plugin.aspx" rel="nofollow">http://haacked.com/archive/2009/12/15/live-preview-jquery-plugin.aspx</a>
  However, this did not work, as nothing showed up and also I wasn't fond of the live preview idea. </p>
  
  <p>I also tried a javascript code from here: <a href="http://www.codingforums.com/showthread.php?t=174810" rel="nofollow">http://www.codingforums.com/showthread.php?t=174810</a>, but once again, it didn't come up with anything...</p>
  
  <p>I hope that's good info, if I should include anything else, please let me know :)</p>