Sunday, March 11, 2012

Passing formatted text from ModalPopup back to the page

This is the right way to do it. Note in HTML lines feeds ans spaces get removed so you see the intended behavior. What you have to do is to convert line feeds to <br />

$get('Paragraph1').innerHTML = $get('TextArea1').value.replace(/\r\n|\n/g, '<br />'));

No comments:

Post a Comment