[Javascript] linebreak in textarea

George Pitcher george.pitcher at ingenta.com
Mon May 24 09:13:19 CDT 2004


Use double quotes to make the escape work.

George

> -----Original Message-----
> From: javascript-bounces at LaTech.edu
> [mailto:javascript-bounces at LaTech.edu]On Behalf Of Paul McGuire
> Sent: 24 May 2004 3:09 pm
> To: [JavaScript List]
> Subject: Re: [Javascript] linebreak in textarea
> 
> 
> 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
> 
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
> 



More information about the Javascript mailing list