.val(); separated each entry

Discussion in 'JavaScript' started by blktallos, Sep 30, 2014.

  1. #1
    I am working on an application. I need help I cant seem to figure it out. -
    Here is a link to my application live - http://jsfiddle.net/5yQjA/3/

    Everything seems to be working the way I want it to work. I just need to be able to separate each line of text with a different line.

    <p>Example 1</p>

    <p>Example 2 </p>

    <p>Example 3</p>
     
    Solved! View solution.
    blktallos, Sep 30, 2014 IP
  2. blktallos

    blktallos Active Member

    Messages:
    314
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #2
    can someone help me with this javascript problem? Sorry new to JS having problems.
     
    blktallos, Sep 30, 2014 IP
  3. #3
    $("#log").append('<p>'+$("textarea").val()+'</p>');
    Code (markup):
    Is that you want?
     
    Sano000, Oct 1, 2014 IP
    blktallos likes this.
  4. blktallos

    blktallos Active Member

    Messages:
    314
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    60
    #4
    Omogsh, yes lol Thank you a lot. I appreciate it. Thats exactly what I wanted. :)
     
    blktallos, Oct 1, 2014 IP
  5. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #5
    Just a tip - pressing enter in a textarea doesn't submit a form, so there's no reason to prevent enter to be registered, really.
     
    PoPSiCLe, Oct 1, 2014 IP