This is a discussion on How to do wordwrap the HTML content using javascript? within the PHP Programming forums, part of the Web Development category; HI, How to do wordwrap the HTML content using javascript? Thanks, RamkumarB...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| HI Kamal, For example : If there is a word like: Discuss web I need to wrap for 6 characters. So it should be Discuss web Thanks, Ramkumar.B |
| |||
| Hi, the follwing script will helps you...
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example |
| |||
| Hi Ramkumar,
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example |
| |||
| HI Vel, For Large HTML content it didn't work. For ex: Code: <div id="divElem">
<h2 class="r"><a href="http://www.seio.es/test/" class="l" onmousedown="return clk(this.href,'','','res','5','')"><strong>TEST</strong> Magazine - Home</a></h2><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td class="j"><font size="-1"><strong>TEST</strong> is an international journal of Statistics and Probability which is published in English by SPRINGER and sponsored by SEIO (the Spanish Society of <strong>...</strong><br /><span class="a">www.seio.es/<strong>test</strong>/ - 4k - </span><a href="http://72.14.235.104/search?q=cache:nUCOdgJ9bXcJ:www.seio.es/test/ test&hl=en&ct=clnk&cd=5&gl=in" class="fl">Cached</a> - <a href="http://www.google.co.in/search?hl=en&q=related:www.seio.es/test/" class="fl">Similar pages</a></font></td></tr></tbody></table>
</div>
wordwrap('divElem',7); Thanks, Ramkumar.B |
| |||
| Hi Ram, I hope that the following re-modified(from the above scripts) script will wrap the html content regardless of length it having.
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example Last edited by velhari : 11-22-2007 at 04:36 AM. |
| |||
| Hi vel, Excellent your code and i need small modification in your code. I think actually wordwrap means, Wraps a string to a given number of characters But in your code not break the line after what i gave the number of characters. For example, Code: wordwrap('divElem',7); Regards, R.Kamalakannan. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/php-programming/4484-how-do-wordwrap-html-content-using-javascript.html | |||
| Posted By | For | Type | Date |
| velhari's bookmarks on del.icio.us | This thread | Refback | 11-22-2007 02:00 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to assign html Content to RichText as a Normal Text? | poornima | ASP and ASP.NET Programming | 3 | 03-10-2008 03:15 AM |
| How to do wordwrap the HTML content using javascript? | ramkumaraol | PHP Programming | 0 | 11-14-2007 04:01 AM |
| How to get all the links on a HTML page with javascript? | a.deeban | HTML, CSS and Javascript Coding Techniques | 1 | 08-10-2007 06:32 AM |
| HTML and Javascript in email | Anand | PHP Programming | 0 | 07-19-2007 04:28 AM |
| How to create html from the content of the textbox? | Balasubramanian.S | C# Programming | 4 | 03-29-2007 08:30 AM |