How to add quotes to a text input box

This is what you are trying to do.

This " is a test

This is quite easy. All that is required is to replace the " character with ". An example of this in ASP is below

Function ReplaceQuote(s)
  Dim c, r, i
  r = ""

  for i = 1 to Len(s)
    c = Mid(s, i, 1)
    if c = Chr(34) then c = """
    r = r & c
  next
  ReplaceQuote = r
End Function

dim s
s = "This "" is a test"
Response.Write s & "<br />" & vbcrlf

<input type="text" name="t" size="25" value="<%= ReplaceQuote(s) %>">

Another option is to use the Replace function within ASP -- Replace(s, """", "&quot;") -- to get the same result.

Testimonals
I can't envision an easier program to use to record trades.
ProductsMore ...
Electronic Trade Journal
Risk/Reward Calculator
Stock Calculator
Subscription Manager
ArticlesAll
Programming Guidelines
Regular Expressions
Display Source in HTML
HTML-Safe Color Table
Quotes in a HTML TextBox
Convert Windows File to Unix
Shortcuts in the SendTo Menu
Backup and Scan Hard Drive