Multiline Assigning to a varable 
Author Message
 Multiline Assigning to a varable

Im unsure as to weather or not JScript can perform multiline assigning to
varables.
The problem i have is i need to include " and ' and newline chars into a
java varable. worst thing, its a CGI script that will generate Dynamic
Javascript.

Im am looking for something similar to this perl example for javascript. Any
ideas?

$var = <<TEXT;
Hello
this
is
great
fun
TEXT

--
Thanks for your time.

Daniel Wilson
Server Administrator & Head Programmer
Progressive Ideas

http://www.*-*-*.com/
http://www.*-*-*.com/



Sun, 20 Jul 2003 13:28:57 GMT  
 Multiline Assigning to a varable
Daniel,

If I understand the question correctly, you could reproduce the string as
follows:

myString = "Hello\nthis\nis\ngreat\nfun"

\n = new line
\t = tab
\' = single quote
\" = double quote
\\ = backslash

HTH

Tony Spratt
JLT Management Services


Quote:
> Im unsure as to weather or not JScript can perform multiline assigning to
> varables.
> The problem i have is i need to include " and ' and newline chars into a
> java varable. worst thing, its a CGI script that will generate Dynamic
> Javascript.

> Im am looking for something similar to this perl example for javascript.
Any
> ideas?

> $var = <<TEXT;
> Hello
> this
> is
> great
> fun
> TEXT

> --
> Thanks for your time.

> Daniel Wilson
> Server Administrator & Head Programmer
> Progressive Ideas

> http://www.animeland.net
> http://advertising.animeland.net



Sun, 20 Jul 2003 19:47:46 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. SPLIT A LONG STRING TO PUT IN A MULTILINE BOX

2. regular expressions: newline / multiline problem

3. VBScript 5.5b2 - RegExp's new multiline

4. Regular Expressions and multiline behaviour

5. displaying multiline text in textarea

6. multiline eval?

7. Writing Multiline text

8. How to create a multiline comment in VBScript?

9. Scrollbars and multiLine textfields in vb6 ..

10. multiline property not explained well in the vbscript docs

11. Can I create a multiline text entry box?

12. How to assign an expression to a dynamic property in vbscript

 

 
Powered by phpBB® Forum Software