473,386 Members | 1,726 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 23 '05 #1
3 1417
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: NotGiven | last post by:
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?
1
by: Ronaldo N | last post by:
I'm trying to do some javascript form validation and I've discovered a rather difficult situation to handle with IE. Let's say there's a form with three input fields named "name", "method", or...
10
by: Steve Benson | last post by:
Our regular programmer moved on. I'm almost clueless in Javascript/ASP and got the job of adapting existing code. In the page below, everything works until I added the function checkIt() to...
5
by: tabonni | last post by:
Hello All I am creating an ASP page. There are a list of filename and checkbox next to it. When user checked all the documents they want and click ADD TO CLIPBOARD button. All filepaths will be...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
5
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
7
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form...
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
8
by: M.L. | last post by:
Hello. I created a form using JS validation with the form tag as follows: <form name="form1" action="dynaform.php" method="post" onsubmit="return pvg_sub();"> The js validation script sends...
2
by: plumba | last post by:
Ok, another problem... A bit querky this one.. My form calls an onsubmit function to check fields for completion (validation check). Here is a breakdown version of the form: <html>...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.