Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacDonaldsd

macrumors 65816
Original poster
Sep 8, 2005
1,005
0
London , UK
I have the following code :

document.writeln(totalString)

document.writeln(OrderedString)

And these print out the correct information to the web page but all on one line, Where and how do I put the code for a newline ?
 
I have the following code :

document.writeln(totalString)

document.writeln(OrderedString)

And these print out the correct information to the web page but all on one line, Where and how do I put the code for a newline ?

Put this in between the two: document.writeln("<br/>");
Once you're done with that, I recommend reading up a little on JavaScript at w3schools. It's a very helpful resource.

http://www.w3schools.com/
 
Thanks for all of your help

epochblue of using:
document.writeln("<br/>");

works 100% fine.

I was trying with \n and that wouldn't work, it broke the javascript code
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.