Kumar
Kumar

Reputation: 187

how to get newline from server through ajax as javascript and execute it in client?

i am getting reply from server as xyz.innerHTML='blah blah'; in blah blah i want to send newline and it should be displayed as new line in html. what i have to do? please help.

Upvotes: 0

Views: 219

Answers (1)

Sarfraz
Sarfraz

Reputation: 382726

i am getting reply from server as xyz.innerHTML='blah blah'; in blah blah i want to send newline and it should be displayed as new line in html. what i have to do? please help.

Add <br /> to it:

xyz.innerHTML='blah blah<br />';

Note: You can add the <br /> from server-side script too.

Upvotes: 1

Related Questions