Jump to content


Photo

line break help


Best Answer haku, 25 March 2013 - 08:41 PM

output = '$' + templateName + ';' + "\\\n";
Go to the full post


  • Please log in to reply
2 replies to this topic

#1 Th3Boss

Th3Boss

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts

Posted 25 March 2013 - 06:10 PM

Im trying to get it to place a line break after each output

 

    function generateTemplate() {
        output = '$' + templateName + ';' + "<br>";
        output += '$ship=' + fit.shipName + ';' + "<br>";
        output += '$shipTypeID=' + fit.shipTypeID + ';' + "<br>";
        output += '$fitName=' + fit.name + ';' + "<br>";
        output += '$fitID=' + fit.fitID + ';' + "<br>";
    }
 

 

output is displayed in a textarea

 

How do I do this?



#2 haku

haku

    Advanced Member

  • Staff Alumni
  • 6,172 posts

Posted 25 March 2013 - 08:41 PM   Best Answer

output = '$' + templateName + ';' + "\\\n";

Edited by haku, 25 March 2013 - 08:42 PM.


#3 Th3Boss

Th3Boss

    Advanced Member

  • Members
  • PipPipPip
  • 33 posts

Posted 25 March 2013 - 08:47 PM

output = '$' + templateName + ';' + "\\\n";

 

worked with

 

 "\n"
 

It left a \ visible the other way. Thanks!


Edited by Th3Boss, 25 March 2013 - 08:47 PM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com