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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Does JavaScript have a word wrapping feature?

Status
Not open for further replies.

Kruzer

Programmer
Jun 16, 2000
117
US
I have an edit box that a user can enter in data that passes this data to a field and the field is smaller in some case then the text string.&nbsp;&nbsp;Is there a way of adding a method in javascript to wrap text?&nbsp;&nbsp;object.wrap()???<br><br>here's the code<br><br>if (document.phoneForm.phonecheck.checked) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var phoneval = document.phoneForm.phone.value;<br>&nbsp;&nbsp;&nbsp;} else {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var phoneval = &quot;&quot;;<br>&nbsp;&nbsp;&nbsp;}<br>&nbsp;&nbsp;&nbsp;top.topbar.phone = document.phoneForm.phone.value;<br><br>The value of phone needs to be wrapped before it is sent to another function.<br><br> <p>Dano<br><a href=mailto:dskryzer@hotmail.com>dskryzer@hotmail.com</a><br><a href= > </a><br>What's your major malfunction
 
Not with a text box. If you want to use a textarea, you can do this:<br><br>&lt;textarea name=&quot;whatever&quot; rows=&quot;10&quot; cols=&quot;80&quot; wrap=&quot;physical&quot;&gt; <p>nick bulka<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top