Top Ad unit 728 × 90

How to remove \n\n between html element using jquery

Doing projects I got an issue. When a tabular data fetching from the database and showing it into a web page or in a browser its coming with \n\n (character) like



the screen shot. I have used jquery and ajax method and I have got the solution. If you face the issue like this then you can try the following. This is working fine.

var AE = res['Agenda_Entry'];
AE = AE.replace(/(\\r\\n|\\n|\\r)/gi, ""); //alert(AE);
tinymce.get("txtAgenda_Det").setContent(AE);


And if you get the same problem in php then you can use or try the following code

//for php
$Reso_Entry = stripslashes(str_replace(array("\\r","\\n")," ", $row1['Reso_Entry']));
 Or if anyone get the other solution then you can add your answer so that developer or reader can get help from this. All the best.
 
How to remove \n\n between html element using jquery Reviewed by Ashok Sen on 01:47:00 Rating: 5

No comments:

Website Design Company at Kolkata All Rights Reserved © 2014 - 2019
Developed by Asenwebmedia

Contact Form

Name

Email *

Message *

Powered by Blogger.