The problem here is simply an HTML problem (but with an ASP solution). Take
these lines of HTML:
1. <input type=text value=Mary's cat said "meow.">
2. <input type='text' value='Mary's cat said "meow."'>
3. <input type="text" value="Mary's cat said "meow."">
None of those will display what you want.
In number 1, there is no ' or " delimiting the value of the input, so you
will only see text up until the first space.
In number 2, ' is the delimiter for the value of the input. So, the first
time the browser encounters a second ', it will take that to mean the end of
the value of the input. Anything after that is just unrecognized markup
that the browser will ignore. So, you would see:
In number 3, ' is the delimiter for the value of the input. This time, the
first time the browser encounters a " character, it will take that to mean
the end of the value. So, you'd see:
[Mary's cat said ]
Basically, if you're going to delimit your form values with ", you cannot
use that character in the value. Or, if you use ' as the delimiter, you
cannot use ' in the value. I suggest you pick a delimiter and stick with
it. If you want to follow the "strict" rules that are being phased into
HTML, X-HTML, or whatever, you should select the " as your value delimiter.
So, assuming you pick ", and you religiously always use it to delimit any
inline values in a tag, your solution is this:
'''drop that other function you had.
SafeOut = Replace(s,"""",""")
sValue = Recordset.Fields.Item(ColumnName).Value
Tmp = Tmp & "<TD BGCOLOR=""" & sRowColor & """ valign=""Top"">" & _
"<INPUT TYPE=""Text"" NAME=""Comment"" SIZE=""50"" VALUE=""" & _
SafeOut(sValue) & """></TD>"
Ray at work
"Serge Myrand" <qc.ca> wrote in message