title: jQuery: Preview & Format Textbox Input
body: <p>I'm trying to create a textbox for a user to type in a filename. Using jquery, the filename will be previewed in a DIV below the textbox.  When typing, the filename should also format in the preview  DIV so that spaces are replaced with dashes, converted to lowercase and '.php' is appended to the end.  When the typing is done, the textbox value should  change too so when the form is submitted the proper formatting is what's posted to my processing script.</p>
  
  <p>For example, if user types "New Filename Here", the preview div should show "new-filename-here.php"  as the user is typing and when the textbox is blurred or .focusout  it should too display "new-filename-here.php".</p>
  
  <p>I have a JsFiddle example below that will preview what is being typed into a textbox, but I cannot seem to do the second part of formatting the filename and replacing the textbox value on .focusout.  </p>
  
  <p><strong>Example JsFiddle:</strong>  <a href="http://jsfiddle.net/Wz4aa/" rel="nofollow">http://jsfiddle.net/Wz4aa/</a></p>
  
  <p>The whole point of this is so the user can preview what a newly created filename will be and change it to their liking before submitting a form.</p>
  
  <p>Any help would be appreciated, thanks! </p>