copy and paste form RTF document into field in asp form cause it to bypass field length and javascri

N

NotGiven

I have a web form with several fields. If I copy & paste from a RTF
document into a field, the javascript validation and field length are
bypassed and cause the form to fail.

Any ideas?
 
K

kaeli

I have a web form with several fields. If I copy & paste from a RTF
document into a field, the javascript validation and field length are
bypassed and cause the form to fail.

Any ideas?

Code better?

(I have no clue. I've never heard of such a thing. Post code so we can
see what's going on along with a working example if possible.)

--
--
~kaeli~
A midget fortune teller who escapes from prison is a small
medium at large.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace
 
M

Michael D. Kersey

NotGiven said:
I have a web form with several fields. If I copy & paste from a RTF
document into a field, the javascript validation and field length are
bypassed and cause the form to fail.

Any ideas?
Possibly you should HTMLEncode the field value(s)?

i.e., when a field is first input:
strField = Server.HTMLEncode( Request.Form( RTFfield ) )

Or you could HTMLEncode it immediately prior to output, e.g.,
<input type="text" name="myname"
value= "<% =Server.HTMLEncode( rs("myField1") ) %>"
or in a table,
<td><% =Server.HTMLEncode( rs("MyField2") ) %></td>

Reason I raise this is that, if you are not using HTMLEncode, then
perhaps control characters in the RTF text are interfering with the HTML
display.

Good Luck,
Michael D. Kersey
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top