By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,695 Members | 1,597 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,695 IT Pros & 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?

P: n/a
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 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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 23 '05 #2

P: n/a
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 23 '05 #3

P: n/a
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 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.