...

View Full Version : how do you create a new line



6arredja
12-20-2006, 04:24 PM
im making a script that creates a line of data then makes a new line and writes more data ex:

data data data
data data data

heres the code im using:


while (x!=3)
document.form1.textarea1.value+="data data data";


how do i make a new line???????????????

arrrrgghhhh!

nikkiH
12-20-2006, 04:30 PM
(Textarea must be set to accept line breaks with wrap property.)

Try "\n" or "\r\n".

document.form1.textarea1.value+="data data data" + "\n";
or
document.form1.textarea1.value+="data data data" + "\r\n";

I left it as a separate string, because I assume "data data data" is actually some variable somewhere.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum