Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forum Design Problem

Status
Not open for further replies.

Simmantix

Technical User
Jul 14, 2003
4
0
0
GB
I have recently designed a forum and one page, the 'New Thead' page, obviously has a text area for the users to enter their text in. However when the character length of the text gets to 1000 or so, presumably including CRLF's and <BR>'s or whatever, it will not continue to the next page wiich previews the contents of the form on the last page.

When there are less characters in the box, however, the page works fine and the next page previews it fine, this mkes me presume that there is some kind of maximum character length for textarea which is messing it up..

What is the problem?
How can I fix it? Will I have to split the text up into chunks and then stitch them back together for viewing?
will I have to restrict the length of a post??

thanks for your help!!

Simm
 
This is the code...

The page comes up initially with ID and RND in the querystring..

If the there is no value for 'Status' querystring value then it shows the initial form. This has a defualt value set with text over 1000 characters as at this number of characters the code no longer works.

The form is submitted back to itself with the status set to preview which then previews the form, then submit again to save the record to the DB..

The problem seems to be with lines 62 - 67, highlghted in the code, though I cannot work out why. The reshowing of the page seems to screw it up.

The problem is that when there are a small number of letters in the textarea, it works fine, but when there is a large number, it won't find the page when you try to preview it.

Any thoughts would be good...





<%@LANGUAGE=&quot;VBSCRIPT&quot; CODEPAGE=&quot;1252&quot;%>
<HTML><head><title>ELSL Forum - New Thread</title>

</head><font face=&quot;Arial&quot;>

<Center><table width=&quot;750&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<!--DWLayoutTable-->
<tr>
<td width=&quot;750&quot; height=&quot;110&quot; valign=&quot;top&quot;><div align=&quot;center&quot;><img src=&quot;/forum/assets/Images/IMG_ForumELogo.gif&quot; width=&quot;225&quot; height=&quot;100&quot;></div>
</td>
</tr>
</table></Center>
<%

strID = Request.Querystring(&quot;ID&quot;)
strRND = Request.Querystring(&quot;RND&quot;)

%>

<!-- It seems to be something to do with the bit of code beneath here... -->



<center><table width=&quot;750&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<!--DWLayoutTable-->
<tr>
<td height=&quot;25&quot; valign=&quot;top&quot;><!--DWLayoutEmptyCell-->&nbsp;</td>
<td width=&quot;125&quot; valign=&quot;top&quot;><a href=&quot;/index.asp&quot;><img src=&quot;/forum/Assets/Images/BUTT_ELSLHome.gif&quot; width=&quot;120&quot; height=&quot;21&quot; border=&quot;0&quot;></a></td>
<td width=&quot;125&quot; valign=&quot;top&quot;><a href=&quot;/forum/forum.asp?ID=<%=strUserID%>&RND=<%=strRND%>&quot;><img src=&quot;/forum/Assets/Images/BUTT_SelForum.gif&quot; width=&quot;120&quot; height=&quot;21&quot; border=&quot;0&quot;></a></td>
<td width=&quot;125&quot; valign=&quot;top&quot;><a href=&quot;/forum/NewThread.asp?ID=<%=strUserID%>&RND=<%=strRND%>&quot;><img src=&quot;/forum/Assets/Images/BUTT_NewSubject.gif&quot; width=&quot;120&quot; height=&quot;21&quot; border=&quot;0&quot;></a></td>
<td width=&quot;124&quot; valign=&quot;top&quot;><a href=&quot;/forum/Account/ChangeUser.asp?ID=<%=strUserID%>&RND=<%=strRND%>&quot;><img src=&quot;/forum/Assets/Images/BUTT_Account.gif&quot; width=&quot;120&quot; height=&quot;21&quot; border=&quot;0&quot;></a></td>
<td width=&quot;126&quot; valign=&quot;top&quot;><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<TR>
<td width=&quot;125&quot; height=&quot;21&quot;>&nbsp;</td>
<td colspan=&quot;4&quot; valign=&quot;top&quot;><hr>
</td>
<td>&nbsp;</td>
</TR>
</table>


<!-- and above here... If you take out lines 62 - 67 it works fine but not with them in.. -->


<%
SELECT CASE Request.QueryString(&quot;Status&quot;)
CASE &quot;&quot;
%>


<form name=&quot;Reply&quot; action=&quot;/forum/test.asp?Status=Preview&<%=request.QueryString()%>&quot; method=&quot;post&quot;>
<textarea name=&quot;txtText01&quot; cols=&quot;50&quot; rows=&quot;15&quot;>Welcome to the Eclipse E-Forum. This is a service designed to help you, our user, by giving you the chance to discuss topics of interest, ask questions in a user friendly environment and help other users with the benefit of your experience of Eclipse.
Please note that system errors must continue to be logged on Eclipse eservice.

New threads should be meaningfully titled and provide as much relevant information as possible to allow fellow users to reply with ease. Subject threads should also be posted in the most relevant forum for the matter under discussion.

Replies to Subject threads should be concise and informative.

New subjects and replies will appear instantly in the forum so you can check back for replies when it is convenient.

If you have any problems, questions or suggestions please use the link in the bottom bar to contact the WebMaster.

We hope to will make use of and benefit from this service

The ELSL WebTeam</textarea><BR><input type=&quot;submit&quot;></form>
<%
Case &quot;Preview&quot;
Dim strForumChoice, strMessageBody
strForumChoice = Request.Form(&quot;lstArea&quot;)
strMessageBody = Request.Form(&quot;txtText01&quot;)
strMessageBody = Replace(strMessageBody, vbCrLf, &quot;<br>&quot;)

%>
<form name=&quot;Reply&quot; action=&quot;/forum/test.asp?Status=Submit&ID=<%=request.QueryString(&quot;ID&quot;)%>&RND=<%=Request.QueryString(&quot;RND&quot;)%>&quot; method=&quot;post&quot;>
<textarea cols=&quot;50&quot; rows=&quot;15&quot;><%=request.Form(&quot;txtText01&quot;)%></textarea></form>


<%case &quot;Submit&quot;

Dim strSubject, strText01, RSNewThread, strThreadSQL, strUser, strArea

IF NOT Request.ServerVariables(&quot;CONTENT_LENGTH&quot;) = 0 THEN
strSubject = Request.Form(&quot;txtSubject&quot;)
strText01 = Request.Form(&quot;txtText01&quot;)
strUser = Request.QueryString(&quot;ID&quot;)
strArea = Request.Form(&quot;lstArea&quot;)

RS.Open &quot;GenForum&quot;, DB, 0, 3
RS.AddNew
RS(&quot;Subject&quot;) = strSubject
RS(&quot;SubDate&quot;) = NOW
RS(&quot;Text01&quot;) = strText01
RS(&quot;User&quot;) = strUser
RS(&quot;Area&quot;) = strArea
RS.Update
RS.Close
DB.Close


ELSE
Response.Redirect(strRefresh)
END IF

%>
<table width=&quot;690&quot; border=&quot;0&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;>
<!--DWLayoutTable-->
<tr>
<td width=&quot;690&quot; height=&quot;200&quot; valign=&quot;top&quot;><p align=&quot;center&quot;>&nbsp;</p>
<p align=&quot;center&quot;><font face=&quot;Arial&quot;>Your
new subjec</font><font face=&quot;Arial&quot;>t post has submitted to the <strong>'
<%
strForumChoice = Request.Form(&quot;lstArea&quot;)
Select Case strForumChoice
case &quot;1&quot;
Response.Write &quot;General Eclipse Forum&quot;
case &quot;2&quot;
Response.Write &quot;Enq's, App's & Enr's Forum&quot;
case &quot;3&quot;
Response.Write &quot;Provision Forum&quot;
case &quot;4&quot;
Response.Write &quot;Examinations Forum&quot;
case &quot;5&quot;
Response.Write &quot;Timetabling and Registers Forum&quot;
case &quot;6&quot;
Response.Write &quot;ILR Forum&quot;
case &quot;7&quot;
Response.Write &quot;Reporting Forum&quot;
end select%>
'</strong>. </font></p>
<p align=&quot;center&quot;><font face=&quot;Arial&quot;>You will now be redirected back
to the forum selection page</font></p>
</td>
</tr>
<tr>
<td height=&quot;94&quot;>&nbsp;</td>
</tr>
</table>
<meta http-equiv=&quot;Refresh&quot; content=&quot;2; URL=<%=strRefresh%>&quot;>
<font face=&quot;Arial&quot;>

<%End SELECT%>
</font></font></center>
<!--#include virtual=&quot;/Forum/Assets/Includes/Footer.inc&quot;-->


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top