Click to See Complete Forum and Search --> : Js and line break - is it possible?


Melons
12-21-2003, 09:37 AM
Quick question,

is it possible to have a line break in a js random array file?

For instance, in the following code, a1 might be randomly selected and bring back hello mum on a single line, but I want the hello and the mum on separate lines...is it possible?


var a1 = new Array(23)

a1[0]="hello Mum"
etc
etc


Cheers,

Mel

Pittimann
12-21-2003, 09:44 AM
Hi!

If you need that for output to an HTML document, just use:

var a1 = new Array(23)
a1[0]="hello<br>Mum";
etc...

Cheers - Pit

Melons
12-21-2003, 10:32 AM
Hey Pit,

thanks for answering so quickly...you're a darlin'..

Merry Christmas!!

Mel xox

Pittimann
12-21-2003, 10:41 AM
Hi!

You're welcome!! And merry Xmas etc. for you too!

Cheers - Pit :p