PDA

Click to See Complete Forum and Search --> : new line


Jeremy Martin
Oct 30th, 2000, 06:23 PM
ok i have this little problem. At on time I had a javascript that contained more than one line of stuff in a variable and I need to do it again but can remeber. Here's what I am trying to do, or at least and example.

<script ~~~~~>
var1='test" %60"'
var1= var1 + a_new_line_somehow "somemorestuff"

writeln(var1)
</script>

I need the outpout to look like this:

test %60
somemorestuff

the funny thing is that the two lines of text need to be contained in none variable.

any ideas what I am missing, any help would be apprecitated.

Jeremy :)

noone
Oct 30th, 2000, 07:16 PM
\n is the escape character for a new line.

<script ~~~~~>
var1='test" %60"'
var1+="\nsomemorestuff"

writeln(var1)
</script>