Replace chr(13) witn <br>

Hi all,

I was wondering is anyone know how to do the above. I have a form that has a preview button which previews the form in iFrame on the same page.

The form has a textarea and when there is a line return and I preview the form in the iFrame the line returns are not shown.

in ASP I would do i like these:
[VBS]x = Replace(chr(13), “<br>”)[/VBS]

This is what I have in javascript:

var post
post =
post = post.replace(chr(13), "<br>")

But it displays nothing

", “<br>”)

Thanks jofa your a life saver