View Single Post
Old Jan 29th, 2006, 12:08 AM   #1
Intimidat0r
Hobbyist Programmer
 
Intimidat0r's Avatar
 
Join Date: May 2005
Location: Don't know, but the padded walls are a nice touch.
Posts: 126
Rep Power: 0 Intimidat0r is an unknown quantity at this point
Send a message via ICQ to Intimidat0r Send a message via AIM to Intimidat0r Send a message via MSN to Intimidat0r Send a message via Yahoo to Intimidat0r
newline in javascript

var power_msg = "Clicks per hour: 123\nClicks per day: 456\nLink Clicks: 789/250\nPower gained yesterday:987\n";
document.write(power_msg);

This just prints:

Quote:
Clicks per hour: 123 Clicks per day: 456 Link Clicks: 789/250 Power gained yesterday:987
without the newlines that should be there from all the \n. Any idea why? I Googled, and \n seems to be the newline in JavaScript.

I also tried with \r (it said that was for Windows) but it had the same effect.

Any help would be appreciated. Thanks!
__________________
Children in the dark cause accidents, and accidents in the dark cause children.

http://www.ronincoders.org
Intimidat0r is offline   Reply With Quote