function displayHTML(form) {
var inf = form.txtStory.value;
var tmp = inf.replace(new RegExp(/\r\n/g),"<br>");
win = window.open(", ", 'popup', 'toolbar = no, status = no, height=500 width=410 resizable=yes, scrollbars=yes');
win.document.write("<font face='arial' size=2><b>Preview your message:</b><br><br>" + tmp + "<br><br><a href='#' onclick='window.close()'><img border=0 src='images/close_button.gif'></a></font>");
}
its writing out but the Replace function does not replace the newline breaks with <BR>
thanks
var inf = form.txtStory.value;
var tmp = inf.replace(new RegExp(/\r\n/g),"<br>");
win = window.open(", ", 'popup', 'toolbar = no, status = no, height=500 width=410 resizable=yes, scrollbars=yes');
win.document.write("<font face='arial' size=2><b>Preview your message:</b><br><br>" + tmp + "<br><br><a href='#' onclick='window.close()'><img border=0 src='images/close_button.gif'></a></font>");
}
its writing out but the Replace function does not replace the newline breaks with <BR>
thanks