hi,
is it possible to have a string variable to contain new lines. i tried
the following but it didnt work:
var_string = '<h1>Title</h1>
<img src="image.gif>
<p>Body text</p>';
i know that html will display the same if i was to write the above
into, for example, a <span> tag but i have a very large amount of html
to be contained inside a variable. what i will do first is design it
in dreamweaver and then cut and paste it. as dreamweaver will
automatically format the code with new lines, for me to contain it
inside a variable i will have to put it all into one line (time
consuming and messy). is it possible to do this or hava a special
symbol to declare a new line (i.e. \n in php).
also, is there a limit to the amount of characters that can be
contained within a javascript string variable? cheers
burnsy
is it possible to have a string variable to contain new lines. i tried
the following but it didnt work:
var_string = '<h1>Title</h1>
<img src="image.gif>
<p>Body text</p>';
i know that html will display the same if i was to write the above
into, for example, a <span> tag but i have a very large amount of html
to be contained inside a variable. what i will do first is design it
in dreamweaver and then cut and paste it. as dreamweaver will
automatically format the code with new lines, for me to contain it
inside a variable i will have to put it all into one line (time
consuming and messy). is it possible to do this or hava a special
symbol to declare a new line (i.e. \n in php).
also, is there a limit to the amount of characters that can be
contained within a javascript string variable? cheers
burnsy
Comment