My newsweblog has ASP pages with news articles and a commenting system. The comments are posted, and to read them the reader clicks on the headline of the comment, and it opens up in a pop up window.

I added a rich text editor and it seems to work fine, to the comments textbox where readers comment on articles.
I type the comment using the editor when i need to format the text and then click submit.

However, when i open the comments to read them, the formatting doesn't show, instead there are tags and html in the comment box.

How do i correct this? or does anyone know what i need to add to this page or the 2nd pop up window page?

Here is the code below, do i need to add something to it? Any help appreciated, and i'm not html or ASP literate, Thank you

This is the form with the code that calls up the rich text editor,


<table align="center" width="400" cellpadding="2" cellspacing="0" border="0">
<form action="_comments.asp?ID=<%=NID%>" method="post" name="frm3" id="frm3" onSubmit="return ValidateComment()">
<tr>
<td width="100">Name</td>
<td width="300"><%=Session("PMMS_USERNAME")%></td>
</tr><tr>
<td>Country</td>
<td width="300"><%=Session("PMMS_COUNTRY")%></td>
</tr><tr>
<td>Subject*</td>
<td width="300"><input type="Text" name="subject" value="" maxlength="50" class="textbox" style="width: 100%"></td>
</tr><tr>




<%

'Declare the ASP variables used
Dim strFormName
Dim strTextAreaName

'ID tag name of the HTML form the textarea is within
strFormName = "frm3"

'ID tag name of HTML textarea being replaced
strTextAreaName = "comment"

%>




<td valign="top">Comment*</td>
<td width="300"> <!-- include the Web Wiz Rich Text Editor -->
<!--#include file="RTE_editor_inc.asp" --> <textarea name="comment" id="comment" rows="6" cols="50" style="width: 100%;" class="textbox"></textarea>




<input type="Checkbox" name="allowE" value="1" />Allow readers to email me.
</td>
</tr><tr>
<td></td>
<td><input type="Submit" value="Leave Comment" /></td>
</tr>
<input type="Hidden" name="mode" value="set" /></form>
</table>

and this is the page that the comments open up in,





<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>

<!--#include file="inc_api.asp"-->
<!--#include file="config.asp"-->
<title>Untitled</title>

<link rel="STYLESHEET" type="text/css" href="styles.css">
<link href="styles.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style5 {
font-size: 9;
color: #55A0FF;
}
.style6 {font-size: 9px}
-->
</style>




</head>

<script language="JavaScript" type="text/javascript">
<!--
function popwindow(Name,scrollBar,theWidth,theHeight,theTop,theLeft)
{
var desktop=window.open(Name,"_blank","toolbar=no,titlebar=no,location=no,status=no,menubar=no,resizable =no,scrollbars="+scrollBar+",width="+theWidth+",height="+theHeight+",top="+theTop+",left="+theLeft+" ");
}
// -->
</script>

<body bgcolor="#FFFFFF" text="#000000" topmargin="5" leftmargin="5" marginwidth="5" marginheight="5">
<body OnLoad="initialiseWebWizRTE();">
<body style="overflow:hidden;">
<table width="95%" height="100%" align="center">
<% Dim ID, RS, SQL, NAME, EMAIL, COMMENT, sDATE, IO, M_ID, SUBJECT, CITY, COUNTRY, ALLOW_E, AID, NEXT_ID, BACK_ID

ID = Trim(Request.QueryString("ID"))
AID = Trim(Request.QueryString("AID"))
IF IS_VALID_ID(ID) = False OR IS_VALID_ID(AID) = False THEN Response.END
IF Trim(Session("PMMS_IN")) = "True" THEN blLOGGED_IN = True

SQL = "SELECT fldNAME, fldEMAIL, fldCOMMENT, fldDATE, fldIP, fldM_ID, fldSUBJECT, fldCITY, fldCOUNTRY, fldALLOW FROM nm_tbl_comment WHERE ID = " & ID
Call OPEN_DB()

' Comment details

Set RS = Server.CreateObject("ADODB.Recordset")
RS.LockType = 1
RS.CursorType = 0
RS.Open SQL, MyConn
IF NOT RS.EOF THEN
NAME = trim(RS("fldNAME"))
EMAIL = trim(RS("fldEMAIL"))
COMMENT = trim(RS("fldCOMMENT")) & ""
sDATE = trim(RS("fldDATE"))
IP = trim(RS("fldIP"))
M_ID = trim(RS("fldM_ID"))
SUBJECT = trim(RS("fldSUBJECT"))
CITY = trim(RS("fldCITY"))
COUNTRY = trim(RS("fldCOUNTRY"))
ALLOW_E = trim(RS("fldALLOW"))
END IF
RS.Close
Set RS = Nothing

' Next Link

SQL = "SELECT TOP 1 ID FROM nm_tbl_comment WHERE fldNEWS_ID = " & AID & " AND ID > " & ID & " ORDER BY ID ASC"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, MyConn
IF NOT RS.EOF THEN
NEXT_ID = trim(RS("ID"))
END IF
RS.Close
Set RS = Nothing

' Back Link

SQL = "SELECT TOP 1 ID FROM nm_tbl_comment WHERE fldNEWS_ID = " & AID & " AND ID < " & ID & " ORDER BY ID DESC"
Set RS = Server.CreateObject("ADODB.Recordset")
RS.Open SQL, MyConn
IF NOT RS.EOF THEN
BACK_ID = trim(RS("ID"))
END IF
RS.Close
Set RS = Nothing

MyConn.Close
Set MyConn = Nothing



%>

<tr>
<td height="309" table colspan="4" valign="top"><strong><%=SUBJECT%></strong> <br />
<br />
<span class="style5"><%= NAME %> - <%=CITY%> - <%=COUNTRY%> - <%=FormatDateTime(sDATE,1)%> - <%=FormatDateTime(sDATE,3)%></span><br />
<br />
<!--change the distance between bottom nav and comment body in the height here,-->
<div style="width:100%;height:85%;overflow:auto"' border=0><%=Replace(COMMENT, Vbcrlf, "<br />")%></div></td>
</tr>
<tr>
<td width="20%" height="38" align="left" valign="middle"><%IF blLOGGED_IN = True THEN%>
<a href="javascript:Respond();" class="keyplayersmall style6">Post Reply</a>
<%END IF%>
&nbsp;</td>
<td width='20%' height='38' align='left' valign='middle'><%IF ALLOW_E = "1" THEN%>
<a href="javascriptopwindow('_email.asp?ID=<%=ID%>&amp;AID=<%=AID%>','name','450','410','230','200');"><img src='comment_imgs/e_email.gif' width='49' height='12' alt='' border='0' /></a>
<%END IF%>

&nbsp;</td>
&nbsp;</td>
<td width="40%" height="38" align="center" valign="middle"><%IF IS_VALID_ID(BACK_ID) AND NOT (BACK_ID = "" OR IsNUll(BACK_ID)) THEN %>
<a href="_comment_view.asp?ID=<%=BACK_ID%>&amp;AID=<%=AID%>"><img src="comment_imgs/button-last.gif" width="52" height="19" alt="" border="0" /></a>
<%END IF%>
&nbsp;
<%IF IS_VALID_ID(NEXT_ID) AND NOT (NEXT_ID = "" OR IsNUll(NEXT_ID)) THEN%>
<a href="_comment_view.asp?ID=<%=NEXT_ID%>&amp;AID=<%=AID%>"><img src="comment_imgs/button-next.gif" width="52" height="19" alt="" border="0" /></a>
<%END IF%>
&nbsp;</td>
<td width="20%" height="38" align="right" valign="middle"><a href="javascript:window.close();"><img src="comment_imgs/e_close.gif" width="47" height="12" alt="" border="0" /></a>&nbsp;</td>
</tr>
</table>
<script langauge="javascript">
function Respond(){
opener.document.frm3.subject.value="RE:<%=SUBJECT%>";
opener.document.frm3.comment.focus();

}
</script>

</body></html>