Textarea content

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ashes2Ashes
    New Member
    • Jan 2008
    • 3

    Textarea content

    I have a function on my webpage that inputs content into a textarea. Everytime a button is clicked the information is inputted into the text area. But I'd like to change the format of how it is entered into the textbox. What I'd like to know is, is it possible to have each new input on a new line rather than all being on the same line. like this:

    1
    2
    3
    4
    5
    etc...

    Rather than it being inputted like this:

    1,2,3,4,5 etc.....



    Thanks
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5388

    #2
    hi ...

    you may add a '\n' (linefeed) to the textarea's current content every time you click the button ... please post the code you have so far, so that we have something to work with :)

    kind regards

    Comment

    • Ashes2Ashes
      New Member
      • Jan 2008
      • 3

      #3
      Originally posted by gits
      hi ...

      you may add a '\n' (linefeed) to the textarea's current content every time you click the button ... please post the code you have so far, so that we have something to work with :)

      kind regards
      I did try to use that '\n' but it didn't seem to work, maybe I put it in the wrong part of my code? I also tried to use CSS to do it but that didn't work either.

      My code so far:

      Code:
      		  		  		  function Go_Go(){
      
      		          var input1=navigation.url_out.value;
      
      		          url1.push(input1);
      
      		          navigation.url_out.value=navigation.url_in.value;
      
      		          navigation.back_stack.value=url1;
      
      				  document.navigation.forward_stack.value='';
      
      				  }
      So when the button is pushed I would like the data entered to be put on a new line.

      Comment

      Working...