Solved

Word Wrap on Form Input ( textarea )

Posted on 2002-05-23
4
2,784 Views
Last Modified: 2013-12-25
 
  I have a form with input type as textarea which can contain up to 10 rows of 78 chars message. I key in the message without break/hard return. Afer submit, I get the param'message');. After I write it to a file (newfile.txt text files format ). Open with notepad/wordpad. I found out the output does not have a hard return instead the text editor treat the whole message as one line. However, I read from a lot of sources. If I do this <textarea name="message" wrap="physical" rows="10" cols="78"></textarea>. The option wrap="physical" should add a hard return at the wrap point ( 78 chars ).However, it does not work as well.

  Anyone can help me on that?

Finding : 1. of cos' if i type the messages with hard return in every 78 char, after submit, I will get a message with hard return each line.

          2. I want user to type everything without keyin return;however, at the end, I can see the "return" at every end of line ( ie. roughly 78 chars ).


<form ... >
  .
  .
  .
<textarea name="message" rows="10" cols="78"></textarea></p>
</form>
0
Comment
Question by:adam_cpng
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:adam_cpng
ID: 7030128
I have a solution to this one already. I am using Text::Wrapper.

But, I am still interested if there is other way that does not use perl module instead. Thanks.

0
 
LVL 49

Expert Comment

by:DanRollins
ID: 8441835
Hi adam_cpng,
<Edited by SpideyMod>
An erroneous auto-delete was posted, we have corrected the problem.  Please indicate recommendations and these will not be scheduled for auto-delete, but will be finalized within the standard week notice.

A recommendation of "PAQ with refund" has already been proposed.

CleanupGuy -- EE database cleanup volunteer
0
 

Accepted Solution

by:
modulo earned 0 total points
ID: 11825654
PAQed, with points refunded (50)

modulo
Community Support Moderator
0

Featured Post

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

It is becoming increasingly popular to have a front-page slider on a web site. Nearly every TV website,  magazine or online news has one on their site, and even some e-commerce sites have one. Today you can use sliders with Joomla, WordPress or …
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
The viewer will learn how to dynamically set the form action using jQuery.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

756 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