[Javascript] linebreak in textarea

Paul McGuire pmcguire at cguk.co.uk
Mon May 24 09:09:00 CDT 2004


My JavaScript is populating a textbox.

myform.textboxfield.value = 'mystring'

I would like a way to auto insert linebreaks into the text box too.

myform.textboxfield.value = 'mystring\n'

just prints

mystring\n

into the text box as does

myform.textboxfield.value = 'mystring' + '\n'

How would I programatically put a sting into a textbox with linebreaks
inserted?

Paul




More information about the Javascript mailing list