468,765 Members | 1,138 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

copy and paste form RTF document into field in asp form cause it to bypass field length and javascript validation - how to overcome?

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?
Jul 19 '05 #1
3 2141
In article <m1****************@bignews5.bellsouth.net>,
no****@nonegiven.net enlightened us with...
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

Jul 19 '05 #2
Is this really an ASP question that involves databases???

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


"NotGiven" <no****@nonegiven.net> wrote in message
news:m1****************@bignews5.bellsouth.net...
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?

Jul 19 '05 #3
NotGiven wrote:
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
Jul 19 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

10 posts views Thread by Steve Benson | last post: by
7 posts views Thread by h7qvnk7q001 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.