Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Insert HTML line breaks in jQuery?
- function submit_post(){
- var post = $('#textarea').val();
- $.('post', { post: post }, function(result){
- //if PHP returns an error do something
- else{
- $('#divname').prepend(result);
- }
- //PHP processes the user's post
- $post = nl2br(stripslashes($post));
- //print html formats the post
- echo $post;
- //html ends
- while(string.search("n")) {
- string.replace("n", "<br>");
- }
Add Comment
Please, Sign In to add comment