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 |
|
#1
| |||
| |||
| HI, How to do wordwrap the HTML content using javascript? Thanks, RamkumarB |
|
#2
| |||
| |||
| Hi ramkumar, I am can't get your question can u tell me exactly what you want? Regards, R.Kamalakannan. |
|
#3
| |||
| |||
| 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 |
|
#4
| |||
| |||
| Hi, the follwing script will helps you...
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example |
|
#5
| |||
| |||
| HI, It breaks HTML Tags.I need wrap the content without breaking html tags. Thanks, Ramkumar.B |
|
#6
| |||
| |||
| Hi Ramkumar,
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example |
|
#7
| |||
| |||
| 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 |
|
#8
| |||
| |||
| 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 03:36 AM. |
|
#9
| |||
| |||
| hi Vel, It works fine. Thanks, Ramkumar.B |
|
#10
| |||
| |||
| 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 | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Basics Of HTML, JavaScript And CSS Writing. | paulcage | HTML, CSS and Javascript Coding Techniques | 4 | 09-16-2009 07:39 PM |
| how to assign html Content to RichText as a Normal Text? | poornima | ASP and ASP.NET Programming | 3 | 03-10-2008 02:15 AM |
| How to do wordwrap the HTML content using javascript? | ramkumaraol | PHP Programming | 0 | 11-14-2007 03:01 AM |
| HTML and Javascript in email | Anand | PHP Programming | 0 | 07-19-2007 03:28 AM |
| How to create html from the content of the textbox? | Balasubramanian.S | C# Programming | 4 | 03-29-2007 07:30 AM |
Our Partners |