forum

Home / DeveloperSection / Forums / How to force a line break on a Javascript concatenated string?

How to force a line break on a Javascript concatenated string?

Takeshi Okada322912-Mar-2013

Hi All!

I'm sending variables to a text box as a concatenated string so I can include multiple variables in on getElementById call.

I need to specify a line break so the address is formatted properly.

document.getElementById("address_box").value =
(title + address + address2 + address3 + address4);
I've already tried \n after the line break and after the variable. and tried changing the concatenation operator to +=.

Thanks in advance!


Updated on 12-Mar-2013

Can you answer this question?


Answer

1 Answers

Liked By