Solved

How to make a textarea act more like wordpad

Posted on 2004-04-27
9
622 Views
Last Modified: 2006-11-17
I am looking for solutions to making a textarea behave more like wordpad etc as far as wrapping..  Someone out there got any ideas??
0
Comment
Question by:John Gates,
[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
  • 2
  • 2
  • 2
  • +3
9 Comments
 
LVL 32

Expert Comment

by:ldbkutty
ID: 10937985
I am afraid if this is what you want !!!???


You have an attribute called WRAP in <TEXTAREA>..
http://www.htmlcodetutorial.com/forms/_TEXTAREA_WRAP.html

Forms TextArea Wrap Tutorial:
------------------------------------
http://www.web-wise-wizard.com/html-tutorials/html-form-forms-textarea-wrap.html

Can you be more specific!?...

0
 
LVL 17

Author Comment

by:John Gates,
ID: 10938565
Um not going to be that easy....  I have the text box being filled by data from a mainframe.  When you go to edit a line it is wrapping down and looking like this:

Line from mainframe.
Line I tried to add

instead of

Line from mainframe.  Line I try to add
0
 
LVL 28

Expert Comment

by:sybe
ID: 10940046
>> I have the text box being filled by data from a mainframe

Mainframes use a different character for hard-return then Windows.

use some code to replace CHR(13) with CHR(13) & CHR(10)

or in javascript: replace '\r' with '\n'



0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Assisted Solution

by:zastil
zastil earned 100 total points
ID: 10940294
How about using div instead of textbox

<div style="overflow: scroll;width:50px;height:50px" nowrap>Line from mainframe.  Line I try to add</div>
0
 
LVL 17

Author Comment

by:John Gates,
ID: 10940562
Um the div is not a bad idea, but I need to get the data back to the mainfram system when the page is submitted.....  
0
 
LVL 3

Accepted Solution

by:
hackman_3vilGuy earned 400 total points
ID: 10998749
Oooo! Pick me!


<SCRIPT>

function getdiv(){
var divtext = thediv.innerText;
hiddenitem.value = divtext;
return true;
}

</SCRIPT>
<BODY>
<div id="thediv" style="overflow: scroll;width:50px;height:50px" nowrap>Line from mainframe.  Line I try to add</div>
<FORM NAME="formid" ID="formid" ACTION="hdfjhk.cgi" METHOD="POST" onSubmit="getdiv();">
<INPUT TYPE="HIDDEN" NAME="hiddenitem" ID="hiddenitem" VALUE=" " />
</FORM>
</BODY>

This will send the div's text as hiddenitem onSubmit.

~Cool. I h8 computers. They crash a lot!
0
 
LVL 18

Expert Comment

by:CrYpTiC_MauleR
ID: 11429826
innerText only works in Internet Explorer.
innerHTML should be used instead.


Regards,
Nick
0
 
LVL 32

Expert Comment

by:ldbkutty
ID: 11429847
CrYpTiC_MauleR,

Are you in holidays ... ?

:-)
0
 
LVL 18

Expert Comment

by:CrYpTiC_MauleR
ID: 11429864
ldbkutty,
go to my profile and contact me if you can. Hate using EE as a messenger system =oP
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XSL Grouping 7 43
How do the JavaScript &&  !== operators work together? 3 72
Form submit issue 11 92
Fulfillment API php code sample 1 95
Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

759 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