?
Solved

TextArea field to allow special characters

Posted on 2005-04-13
12
Medium Priority
?
1,399 Views
Last Modified: 2009-07-29
HI,

I have a textarea field in my form which should allow all special characters.Can anyone give me the solution please.

I have a java script function which validates the form on submit.
0
Comment
Question by:sumanth_ora
  • 5
  • 4
  • 2
  • +1
12 Comments
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 13772230
why wouldn't it allow special characters?
0
 
LVL 25

Expert Comment

by:archrajan
ID: 13772234
normally the textarea field u can type any characters u want.
0
 

Author Comment

by:sumanth_ora
ID: 13772340
i can type any characters i want but when i say submit textarea data has to be updated in the database table.

If i enter any special characters and submit the form i'm getting page not found error.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 25

Expert Comment

by:archrajan
ID: 13772353
so u want to disallow special characters?
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 13772360
that doesn't make any sense.  maybe this is happening in your server-side script, because possibly you're including a single-quote '

you might try escaping the string in whatever server-side script you're using (jsp, asp, php, cfm, etc.)
0
 

Author Comment

by:sumanth_ora
ID: 13772374
i want to allow all special characters.On submit i run a update query which works fine with plain string update.

Database fiels is varchar2(255)
0
 

Author Comment

by:sumanth_ora
ID: 13772440
That's right .It's because of my asp scpript.IN my update statement i say
strSQL = "UPDATE ACTIVE_SIGNUPS SET TICKETS_DISTRIBUTED=" & CINT(tissued) & ", comments = '" & sComnts & "'"

cn.execute(strSQL)

Any solution to allow ' also?
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 13772472
hmm, i don't really know asp...

try something like:

strSQL = "UPDATE ACTIVE_SIGNUPS SET TICKETS_DISTRIBUTED=" & CINT(tissued) & ", comments = '" & Replace(sComnts, "'", "\'") & "'"
0
 

Author Comment

by:sumanth_ora
ID: 13772549
It didn't work
0
 
LVL 13

Expert Comment

by:cLFlaVA
ID: 13772568
this is the JavaScript forum.  Try the ASP forum.
0
 

Author Comment

by:sumanth_ora
ID: 13772585
Sure.Thanks for your help.
0
 
LVL 23

Accepted Solution

by:
Saqib Khan earned 375 total points
ID: 13772732
Replace will Work Fine. But cLFlaVA  in ASP you can not replace by using \.

in ASP when a Single Quote is enter it will gve you a message.


strSQL = "UPDATE ACTIVE_SIGNUPS SET TICKETS_DISTRIBUTED=" & CINT(tissued) & ", comments = '" & Replace(sComnts, "'", "''") & "'"

0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

569 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question