Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Carriage Return help!!!

Status
Not open for further replies.

jlucyk

IS-IT--Management
Aug 1, 2001
10
US
When someone hits the enter key in the comments space on a form with the cgi script in the background it messes up the log file and when I try to import into access it imports into multiple records instead of one. I saw a java progammer use a routine that disabled the right mouse click so you can't get to the code in back of the page. I was wondering if there was any way to disable the enter key so no one can enter on the form. Like have message pop please do not use the enter key.

Please help

John
 
you can use regular expressions in your cgi to replace all carriage returns with regular spaces like this:

$text =~ s/\n/ /g;


:)
 
Check out the documentation for the WRAP parameter to the TEXTAREA tag. There is an option for it (I think it's WRAP=SOFT) that prevents the carriage returns in the text area from being sent to the program. Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top