Search the archives!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Javascript] js for inserting a \n every 80 chars?
- From: matt.murphy at thermofisher.com (Matt Murphy)
- Subject: [Javascript] js for inserting a \n every 80 chars?
- Date: Fri Dec 29 10:25:41 2006
All, I'm very new to js, please forgive if this is a n00b question. I have a script that takes user input from a textarea and dumps it into a <pre> element in a new table cell. The problem is if you type in a long sentance with no breaks, the <pre> will not allow it to wrap, and it'll make the table super wide. I'm wondering if there's a javascript function that will allow me to insert a \n every 80 characters? alternatively, I can dump the text in to just the table cell, but then carriage returns aren't recognized at all, even though the text will wrap. Is there a javascript version of str_replace()? Is there somewhere I can go to look up javascript functions? Thanks in advance, Matt -------------- next part -------------- An HTML attachment was scrubbed... URL: https://lists.LaTech.edu/pipermail/javascript/attachments/20061229/cd0f312d/attachment.html
- Follow-Ups:
- [Javascript] js for inserting a \n every 80 chars?
- From: Triche Osborne
- [Javascript] js for inserting a \n every 80 chars?
- Prev by Date: [Javascript] Js Debug Console
- Next by Date: [Javascript] js for inserting a \n every 80 chars?
- Previous by thread: [Javascript] Passing variables from one page to another
- Next by thread: [Javascript] js for inserting a \n every 80 chars?
- Index(es):