Results 1 to 2 of 2

Thread: new line

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207

    Wink

    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

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Posts
    292
    \n is the escape character for a new line.
    Code:
    <script ~~~~~> 
    var1='test" %60"' 
    var1+="\nsomemorestuff" 
    
    writeln(var1) 
    </script>
    "People who think they know everything are a great annoyance to those of us who do."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width