VK wrote:
Quote:
shimmyshack wrote: Quote: |
>double quotes are magic "\n" is line brk. '\n' isnt.
| >
Only in Perl - and here is JavaScript ;-) JavaScript doesn't care of
quotes type as long as they are matching each other.
>
To OP: do you have an URL to look at?
(And remember that '\n' is
JavaScript is not exactly NL code,
|
Maybe not, but it is LF (line feed), code point 000A (hex), always and
without exception.
Quote:
it's acting more as a
system-dependant constant like vbNewLine in VBA.
|
Nonsense, and if that were the case why would javascript not provide an
escape sequence that was always code point 000A, or why would it provide
'\r' CR (carriage return, code point 000D) as an escape sequence?
Quote:
This way one cane add "\n" on Linux or on Windows and
still get normal line breaks in textarea).
|
Any OS specific translation of a javascript string into a form
appropriate to a textarea on a particular OS happens at the point of
assigning the sting to the - value - property of the host object (as
when a javascript string is passed as an argument to a host-provided
function, and the function transforms its argument once called) and does
not make '\n' in javascript anything other than code point 000A, and
centrally not an OS dependent line terminator.
Richard.