Print Page | Close Window

textarea value disappears

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Rich Text Editor (RTE)
Forum Description: Support forum for the Web Wiz Rich Text Editor (RTE).
URL: https://forums.webwiz.net/forum_posts.asp?TID=20956
Printed Date: 29 March 2026 at 4:26pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: textarea value disappears
Posted By: jenn5175
Subject: textarea value disappears
Date Posted: 08 August 2006 at 9:26pm
When I submit my form, there is nothing in the textarea value that is submitted. It works in the default.asp page supplied, but not in my real life example.

Here is my code

<tr>
                                        <td>Msg:<br>
                                    <%
                      'ID tag name of the HTML form the textarea is within
                      strFormName = "form1"
                     
                      'ID tag name of HTML textarea being replaced
                      strTextAreaName = "sMyMessage"
                     
                      %>
                      <!-- include the Web Wiz Rich Text Editor -->
                      <!--#include file="RTE_editor_inc.asp" -->

                          
                                    <textarea name=sMessage id=sMyMessage rows=15 cols=55><%=sMessage%></textarea></td>
                                    </tr>

And here is where the page submits to:

sMessage = trim(replace(Request.Form("sMessage"), "'", "`"))
    if sMessage = "" then
        sError = sError & "Please enter some text<br>"
    end if


It ALWAYS gives the error message meaning sMessage is blank.

Help!
Jenn




Replies:
Posted By: WebWiz-Bruce
Date Posted: 09 August 2006 at 9:39am
The form name and ID tag need to have the same name eg:-

name="sMyMessage" id="sMyMessage"

Also I can't see the form tag, but make sure that has a different name to tbe texteara but the 'name' and 'id' property have the same name.


-------------
https://www.webwiz.net/web-wiz-forums/forum-hosting.htm" rel="nofollow - Web Wiz Forums Hosting
https://www.webwiz.net/web-hosting/windows-web-hosting.htm" rel="nofollow - ASP.NET Web Hosting


Posted By: jenn5175
Date Posted: 09 August 2006 at 1:08pm
I was being dumb on this one - the issue was I was using a link to submit rather than a submit button. Changing it to a submit button made everything work - sorry!
 
FYI - in the example you guys give us in the zip file the name and id are different - that is why I did it that way (originally I had them the same and thought that might be the issue). Just in case anyone else is reading this, wanted to point it out that from everything I can tell, they DO NOT have to be the same (although it is good practice).
 
Thanks!
Jenn



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net